home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Mud 4.0 / lang.c < prev    next >
Encoding:
Text File  |  1993-03-24  |  150.2 KB  |  5,311 lines  |  [TEXT/????]

  1.  
  2. char yysccsid[] = "@(#)yaccpar    1.4 (Berkeley) 02/25/90";
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. typedef unsigned int size_t;
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. void *memcpy (void *s1, const void *s2, size_t n);
  45. void *memmove (void *s1, const void *s2, size_t n);
  46. char *strcpy (char *s1, const char *s2);
  47. char *strncpy (char *s1, const char *s2, size_t n);
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. char *strcat (char *s1, const char *s2);
  58. char *strncat (char *s1, const char *s2, size_t n);
  59.  
  60.  
  61.  
  62.  
  63.  
  64. int memcmp (const void *s1, const void *s2, size_t n);
  65. int strcmp (const char *s1, const char *s2);
  66. int strcoll (const char *s1, const char *s2);
  67. int strncmp (const char *s1, const char *s2, size_t n);
  68. size_t strxfrm (char *s1, const char *s2, size_t n);
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. void *memchr (const void *s, int c, size_t n);
  76. char *strchr (const char *s, int c);
  77. size_t strcspn (const char *s1, const char *s2);
  78. char * strpbrk (const char *s1, const char *s2);
  79. char *strrchr (const char *s, int c);
  80. size_t strspn (const char *s1, const char *s2);
  81. char *strstr (const char *s1, const char *s2);
  82. char *strtok (char *s1, const char *s2);
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. void *memset (void *s, int c, size_t n);
  90. char *strerror (int errnum);
  91. size_t strlen (const char *s);
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. typedef char *va_list;
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. typedef struct {
  134.     int             _cnt;
  135.     unsigned char    *_ptr;
  136.     unsigned char    *_base;
  137.     unsigned char    *_end;
  138.     unsigned short    _size;
  139.     unsigned short    _flag;
  140.     unsigned short    _file;
  141. } FILE;
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. typedef long fpos_t;
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246. int remove(const char *filename);
  247. int rename(const char *oldname, const char *newname);
  248. FILE *tmpfile(void);
  249. char *tmpnam(char *s);
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. int fclose(FILE *stream);
  257. int fflush(FILE *stream);
  258. FILE *fopen(const char *filename, const char *mode);
  259. FILE *freopen(const char *filename, const char *mode, FILE *stream);
  260. void setbuf(FILE *stream, char *buf);
  261. int setvbuf(FILE *stream, char *buf, int mode, size_t size);
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. int fprintf(FILE *stream, const char *format, ...);
  269. int fscanf(FILE *stream, const char *format, ...);
  270. int printf(const char *format, ...);
  271. int scanf(const char *format, ...);
  272. int sprintf(char *s, const char *format, ...);
  273. int sscanf(const char *s, const char *format, ...);
  274. int vfprintf(FILE *stream, const char *format, va_list arg);
  275. int vprintf(const char *format, va_list arg);
  276. int vsprintf(char *s, const char *format, va_list arg);
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283. int fgetc(FILE *stream);
  284. char *fgets(char *s, int n, FILE *stream);
  285. int fputc(int c, FILE *stream);
  286. int fputs(const char *s, FILE *stream);
  287. int getc(FILE *stream);
  288.  
  289. int getchar(void);
  290.  
  291. char *gets(char *s);
  292. int putc(int c, FILE *stream);
  293.  
  294.  
  295.  
  296. int putchar(int c);
  297.  
  298. int puts(const char *s);
  299. int ungetc(int c, FILE *stream);
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306. size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
  307. size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314. int fgetpos(FILE *stream, fpos_t *pos);
  315. int fseek(FILE *stream, long int offset, int whence);
  316. int fsetpos(FILE *stream, const fpos_t *pos);
  317. long int ftell(FILE *stream);
  318. void rewind(FILE *stream);
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325. void clearerr(FILE *stream);
  326.  
  327. int feof(FILE *stream);
  328.  
  329. int ferror(FILE *stream);
  330.  
  331. void perror(const char *s);
  332.  
  333.  
  334.  
  335.  
  336.  
  337. extern FILE _iob[];
  338.  
  339. int _filbuf(FILE *);
  340. int _flsbuf(unsigned char, FILE *);
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408. typedef unsigned char Byte;
  409. typedef char SignedByte;
  410. typedef char *Ptr;
  411. typedef Ptr *Handle;     
  412.  
  413. typedef long Fixed;         
  414. typedef Fixed *FixedPtr;
  415. typedef long Fract;
  416. typedef Fract *FractPtr;
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424. typedef extended extended80;
  425.  
  426.  
  427.  
  428. enum {false,true};
  429. typedef unsigned char Boolean;
  430.  
  431. enum {v,h};
  432. typedef unsigned char VHSelect;
  433.  
  434.  
  435. typedef long (*ProcPtr)();
  436. typedef ProcPtr *ProcHandle;
  437.  
  438. typedef unsigned char Str255[256],Str63[64],Str32[33],Str31[32],Str27[28],Str15[16],*StringPtr,**StringHandle;
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446. typedef const unsigned char *ConstStr255Param;
  447. typedef ConstStr255Param ConstStr63Param,ConstStr32Param,ConstStr31Param,
  448.  ConstStr27Param,ConstStr15Param;
  449.  
  450. typedef short OSErr;     
  451. typedef unsigned long OSType;
  452. typedef OSType *OSTypePtr;
  453. typedef unsigned long ResType;
  454. typedef ResType *ResTypePtr;
  455. typedef unsigned char Style;
  456. typedef short ScriptCode;
  457. typedef short LangCode;
  458.  
  459.  
  460. struct Point {
  461.  short v;
  462.  short h;
  463. };
  464.  
  465. typedef struct Point Point;
  466. typedef Point *PointPtr;
  467.  
  468. struct Rect {
  469.  short top;
  470.  short left;
  471.  short bottom;
  472.  short right;
  473. };
  474.  
  475. typedef struct Rect Rect;
  476. typedef Rect *RectPtr;
  477.  
  478.  
  479.  
  480.  
  481.  
  482. pascal void Debugger(void)
  483.  = 0xA9FF; 
  484. pascal void DebugStr(ConstStr255Param aStr)
  485.  = 0xABFF; 
  486. void debugstr(char *aStr); 
  487. pascal void SysBreak(void)
  488.  = {0x303C,0xFE16,0xA9C9}; 
  489. pascal void SysBreakStr(ConstStr255Param debugStr)
  490.  = {0x303C,0xFE15,0xA9C9}; 
  491. pascal void SysBreakFunc(ConstStr255Param debugFunc)
  492.  = {0x303C,0xFE14,0xA9C9}; 
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504. enum {
  505.  
  506.  maxSize = 0x800000,     
  507.  defaultPhysicalEntryCount = 8,
  508.  
  509.  
  510.  kPageInMemory = 0,
  511.  kPageOnDisk = 1,
  512.  kNotPaged = 2
  513. };
  514.  
  515. typedef long Size;         
  516. typedef pascal long (*GrowZoneProcPtr)(Size cbNeeded);
  517.  
  518. struct Zone {
  519.  Ptr bkLim;
  520.  Ptr purgePtr;
  521.  Ptr hFstFree;
  522.  long zcbFree;
  523.  GrowZoneProcPtr gzProc;
  524.  short moreMast;
  525.  short flags;
  526.  short cntRel;
  527.  short maxRel;
  528.  short cntNRel;
  529.  short maxNRel;
  530.  short cntEmpty;
  531.  short cntHandles;
  532.  long minCBFree;
  533.  ProcPtr purgeProc;
  534.  Ptr sparePtr;
  535.  Ptr allocPtr;
  536.  short heapData;
  537. };
  538.  
  539. typedef struct Zone Zone;
  540. typedef Zone *THz;
  541.  
  542. struct MemoryBlock {
  543.  void * address;
  544.  unsigned long count;
  545. };
  546.  
  547. typedef struct MemoryBlock MemoryBlock;
  548.  
  549. struct LogicalToPhysicalTable {
  550.  MemoryBlock logical;
  551.  MemoryBlock physical[defaultPhysicalEntryCount];
  552. };
  553.  
  554. typedef struct LogicalToPhysicalTable LogicalToPhysicalTable;
  555.  
  556.  
  557. typedef short PageState;
  558. typedef short StatusRegisterContents;
  559.  
  560.  
  561.  
  562.  
  563.  
  564. pascal THz GetZone(void)
  565.  = 0xA11A; 
  566.  
  567.  
  568.  
  569. pascal Handle NewHandle(Size byteCount)
  570.  = 0xA122; 
  571. pascal Handle NewHandleSys(Size byteCount)
  572.  = 0xA522; 
  573. pascal Handle NewHandleClear(Size byteCount)
  574.  = 0xA322; 
  575. pascal Handle NewHandleSysClear(Size byteCount)
  576.  = 0xA722; 
  577. pascal THz HandleZone(Handle h)
  578.  = 0xA126; 
  579. pascal Handle RecoverHandle(Ptr p)
  580.  = 0xA128; 
  581. pascal Handle RecoverHandleSys(Ptr p)
  582.  = 0xA528; 
  583. pascal Ptr NewPtr(Size byteCount)
  584.  = 0xA11E; 
  585. pascal Ptr NewPtrSys(Size byteCount)
  586.  = 0xA51E; 
  587. pascal Ptr NewPtrClear(Size byteCount)
  588.  = 0xA31E; 
  589. pascal Ptr NewPtrSysClear(Size byteCount)
  590.  = 0xA71E; 
  591. pascal THz PtrZone(Ptr p)
  592.  = 0xA148; 
  593.  
  594.  
  595. pascal long MaxBlock(void)
  596.  = 0xA061; 
  597. pascal long MaxBlockSys(void)
  598.  = 0xA461; 
  599. pascal long StackSpace(void)
  600.  = 0xA065; 
  601. pascal Handle NewEmptyHandle(void)
  602.  = 0xA166; 
  603. pascal Handle NewEmptyHandleSys(void)
  604.  = 0xA566; 
  605. pascal void HLock(Handle h)
  606.  = 0xA029; 
  607. pascal void HUnlock(Handle h)
  608.  = 0xA02A; 
  609. pascal void HPurge(Handle h)
  610.  = 0xA049; 
  611. pascal void HNoPurge(Handle h)
  612.  = 0xA04A; 
  613. pascal void HLockHi(Handle h)
  614.  = {0xA064,0xA029}; 
  615.  
  616.  
  617.  
  618.  
  619.  
  620. pascal Ptr StripAddress(void *theAddress);
  621.  
  622. pascal Ptr Translate24To32(void *addr24)
  623.  = 0xA091; 
  624. pascal Handle TempNewHandle(Size logicalSize,OSErr *resultCode)
  625.  = {0x3F3C,0x001D,0xA88F}; 
  626. pascal Size TempMaxMem(Size *grow)
  627.  = {0x3F3C,0x0015,0xA88F}; 
  628. pascal long TempFreeMem(void)
  629.  = {0x3F3C,0x0018,0xA88F}; 
  630.  
  631. pascal void TempHLock(Handle h,OSErr *resultCode)
  632.  = {0x3F3C,0x001E,0xA88F}; 
  633. pascal void TempHUnlock(Handle h,OSErr *resultCode)
  634.  = {0x3F3C,0x001F,0xA88F}; 
  635. pascal void TempDisposeHandle(Handle h,OSErr *resultCode)
  636.  = {0x3F3C,0x0020,0xA88F}; 
  637. pascal Ptr TempTopMem(void)
  638.  = {0x3F3C,0x0016,0xA88F}; 
  639.  
  640. pascal Size MFMaxMem(Size *grow)
  641.  = {0x3F3C,0x0015,0xA88F}; 
  642. pascal long MFFreeMem(void)
  643.  = {0x3F3C,0x0018,0xA88F}; 
  644. pascal Handle MFTempNewHandle(Size logicalSize,OSErr *resultCode)
  645.  = {0x3F3C,0x001D,0xA88F}; 
  646. pascal void MFTempHLock(Handle h,OSErr *resultCode)
  647.  = {0x3F3C,0x001E,0xA88F}; 
  648. pascal void MFTempHUnlock(Handle h,OSErr *resultCode)
  649.  = {0x3F3C,0x001F,0xA88F}; 
  650. pascal void MFTempDisposHandle(Handle h,OSErr *resultCode)
  651.  = {0x3F3C,0x0020,0xA88F}; 
  652. pascal Ptr MFTopMem(void)
  653.  = {0x3F3C,0x0016,0xA88F}; 
  654. pascal void InitApplZone(void)
  655.  = 0xA02C; 
  656. pascal void InitZone(GrowZoneProcPtr pgrowZone,short cmoreMasters,void *limitPtr,
  657.  void *startPtr); 
  658. pascal void SetZone(THz hz)
  659.  = 0xA01B; 
  660. pascal Size CompactMem(Size cbNeeded)
  661.  = 0xA04C; 
  662. pascal Size CompactMemSys(Size cbNeeded)
  663.  = 0xA44C; 
  664. pascal void PurgeMem(Size cbNeeded)
  665.  = 0xA04D; 
  666. pascal void PurgeMemSys(Size cbNeeded)
  667.  = 0xA44D; 
  668. pascal long FreeMem(void)
  669.  = 0xA01C; 
  670. pascal long FreeMemSys(void)
  671.  = 0xA41C; 
  672. pascal void ResrvMem(Size cbNeeded)
  673.  = 0xA040; 
  674. pascal void ReserveMem(Size cbNeeded)
  675.  = 0xA040; 
  676. pascal void ReserveMemSys(Size cbNeeded)
  677.  = 0xA440; 
  678. pascal Size MaxMem(Size *grow)
  679.  = {0xA11D,0x2288}; 
  680. pascal Size MaxMemSys(Size *grow)
  681.  = {0xA51D,0x2288}; 
  682. pascal void SetGrowZone(GrowZoneProcPtr growZone)
  683.  = 0xA04B; 
  684. pascal void SetApplLimit(void *zoneLimit)
  685.  = 0xA02D; 
  686. pascal void MoveHHi(Handle h)
  687.  = 0xA064; 
  688. pascal void DisposPtr(Ptr p)
  689.  = 0xA01F; 
  690. pascal void DisposePtr(Ptr p)
  691.  = 0xA01F; 
  692. pascal Size GetPtrSize(Ptr p); 
  693. pascal void SetPtrSize(Ptr p,Size newSize)
  694.  = 0xA020; 
  695. pascal void DisposHandle(Handle h)
  696.  = 0xA023; 
  697. pascal void DisposeHandle(Handle h)
  698.  = 0xA023; 
  699. pascal Size GetHandleSize(Handle h); 
  700. pascal void SetHandleSize(Handle h,Size newSize)
  701.  = 0xA024; 
  702. pascal void EmptyHandle(Handle h)
  703.  = 0xA02B; 
  704. pascal void ReallocHandle(Handle h,Size byteCount)
  705.  = 0xA027; 
  706. pascal void ReallocateHandle(Handle h,Size byteCount)
  707.  = 0xA027; 
  708. pascal void HSetRBit(Handle h)
  709.  = 0xA067; 
  710. pascal void HClrRBit(Handle h)
  711.  = 0xA068; 
  712. pascal void MoreMasters(void)
  713.  = 0xA036; 
  714. pascal void BlockMove(const void *srcPtr,void *destPtr,Size byteCount)
  715.  = 0xA02E; 
  716.  
  717. pascal void PurgeSpace(long *total,long *contig); 
  718. pascal char HGetState(Handle h)
  719.  = 0xA069; 
  720. pascal void HSetState(Handle h,char flags)
  721.  = 0xA06A; 
  722. pascal void SetApplBase(void *startPtr)
  723.  = 0xA057; 
  724. pascal void MaxApplZone(void)
  725.  = 0xA063; 
  726. pascal OSErr HoldMemory(void *address,unsigned long count)
  727.  = {0x7000,0xA05C}; 
  728. pascal OSErr UnholdMemory(void *address,unsigned long count)
  729.  = {0x7001,0xA05C}; 
  730. pascal OSErr LockMemory(void *address,unsigned long count)
  731.  = {0x7002,0xA05C}; 
  732. pascal OSErr LockMemoryContiguous(void *address,unsigned long count)
  733.  = {0x7004,0xA05C}; 
  734. pascal OSErr UnlockMemory(void *address,unsigned long count)
  735.  = {0x7003,0xA05C}; 
  736. pascal OSErr GetPhysical(LogicalToPhysicalTable *addresses,unsigned long *physicalEntryCount); 
  737. pascal OSErr DeferUserFn(ProcPtr userFunction,void *argument)
  738.  = 0xA08F; 
  739. pascal long DebuggerGetMax(void)
  740.  = {0x7000,0xA08D}; 
  741. pascal void DebuggerEnter(void)
  742.  = {0x7001,0xA08D}; 
  743. pascal void DebuggerExit(void)
  744.  = {0x7002,0xA08D}; 
  745. pascal void DebuggerPoll(void)
  746.  = {0x7003,0xA08D}; 
  747. pascal PageState GetPageState(const void *address)
  748.  = {0x7004,0xA08D}; 
  749. pascal Boolean PageFaultFatal(void)
  750.  = {0x7005,0xA08D}; 
  751. pascal OSErr DebuggerLockMemory(void *address,unsigned long count)
  752.  = {0x7006,0xA08D}; 
  753. pascal OSErr DebuggerUnlockMemory(void *address,unsigned long count)
  754.  = {0x7007,0xA08D}; 
  755. pascal StatusRegisterContents EnterSupervisorMode(void)
  756.  = {0x7008,0xA08D}; 
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770. struct program;
  771. struct function;
  772. struct svalue;
  773. struct sockaddr;
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789. char *malloc (unsigned) ;
  790. char *realloc (char *, unsigned) ;
  791. int fclose (FILE *)  ;
  792. int pclose (FILE *)  ;
  793. int atoi (char *) ;
  794. void srandom (int) ;
  795. int chdir (char *) ;
  796. int gethostname (char *, int) ;
  797. void abort (void) ;
  798. int fflush (FILE *)  ;
  799. int rmdir (char *) ;
  800. int unlink (char *) ;
  801. int fclose (FILE *)  ;
  802. void qsort (char *, int, int, int (*)()) ;
  803. int fseek (FILE *, long, int)  ;
  804. int _flsbuf();
  805. int fork (void) ;
  806. int wait (int *) ;
  807. int execl (char *, char *, ...) ;
  808. int pipe (int *) ;
  809. int dup2 (int, int) ;
  810. int vfork (void) ;
  811. void free (char *) ;
  812. void exit (int) ;
  813. void _exit (int) ;
  814. unsigned int alarm (unsigned int) ;
  815. int ioctl(int, ...);
  816.  
  817. int _filbuf();
  818. char *crypt (char *, char *) ;
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825. long random (void) ;
  826.  
  827.  
  828. long strtol (char *, char **, int) ;
  829. int link (char *, char *) ;
  830. int unlink (char *) ;
  831.  
  832.  
  833. struct object;
  834. char *get_error_file (char *) ;
  835. void save_error (char *, char *, int) ;
  836.  
  837. int write_file (char *, char *) ;
  838.  
  839. int file_size (char *) ;
  840. char *check_file_name (char *, int) ;
  841. void remove_all_players (void) ;
  842. void load_wiz_file (void) ;
  843. void wizlist (char *) ;
  844. void backend (void) ;
  845. char *xalloc (int) ;
  846. char *xrealloc(char *p, unsigned int size);
  847. void init_string_space (void) ;
  848. void error();
  849. void fatal();
  850. void add_message();
  851. void trace_log();
  852. void debug_message();
  853. void debug_message_value (struct svalue *) ,
  854.     print_local_commands(),
  855.  
  856.  
  857.  
  858.     new_call_out (struct object *, char *, int, struct svalue *, int) ,
  859.  
  860.     add_action (char *, char *, int) ,
  861.     enable_commands (int) ,
  862.     load_ob_from_swap (struct object *) ;
  863.  
  864. int tail (char *) ;
  865.  
  866. struct object *get_interactive_object (int) ;
  867. void enter_object_hash (struct object *) ;
  868. void remove_object_hash (struct object *) ;
  869. struct object *lookup_object_hash (char *) ;
  870. int show_otable_status (int verbose) ;
  871. void dumpstat (void) ;
  872. struct vector;
  873. void free_vector (struct vector *) ;
  874. char *query_load_av (void) ;
  875. void update_compile_av (int) ;
  876. struct vector *map_array (
  877.                    struct vector *arr,
  878.                    char *func,
  879.                    struct object *ob,
  880.                    struct svalue *extra
  881.                    ) ;
  882. struct vector *make_unique (struct vector *arr,char *func,
  883.     struct svalue *skipnum) ;
  884.  
  885. char *describe_items (struct svalue *arr,char *func,int live) ;
  886. struct vector *filter (struct vector *arr,char *func,
  887.                 struct object *ob, struct svalue *) ; 
  888. int match_string (char *, char *) ;
  889. int set_heart_beat (struct object *, int) ;
  890. struct object *get_empty_object (int) ;
  891. struct svalue;
  892. void assign_svalue (struct svalue *, struct svalue *) ;
  893. void assign_svalue_no_free (struct svalue *to, struct svalue *from) ;
  894. void free_svalue (struct svalue *) ;
  895. char *make_shared_string (char *) ;
  896. void free_string (char *) ;
  897. int add_string_status (int verbose) ;
  898. void notify_no_command (void) ;
  899. void clear_notify (void) ;
  900. void throw_error (void) ;
  901. void set_living_name (struct object *,char *) ;
  902. void remove_living_name (struct object *) ;
  903. struct object *find_living_object (char *, int) ;
  904. int lookup_predef (char *) ;
  905. void yyerror (char *) ;
  906. int hashstr (char *, int, int) ;
  907. int lookup_predef (char *) ;
  908. char *dump_trace (int) ;
  909. int parse_command (char *, struct object *) ;
  910. struct svalue *apply (char *, struct object *, int) ;
  911. void push_string (char *, int) ;
  912. void push_number (int) ;
  913. void push_object (struct object *) ;
  914. struct object *clone_object (char *) ;
  915. void init_num_args (void) ;
  916. int restore_object (struct object *, char *) ;
  917. void tell_object (struct object *, char *) ;
  918. struct object *first_inventory (struct svalue *) ;
  919. struct vector *slice_array (struct vector *,int,int) ;
  920. int query_idle (struct object *) ;
  921. char *implode_string (struct vector *, char *) ;
  922. struct object *query_snoop (struct object *) ;
  923. struct vector *all_inventory (struct object *) ;
  924. struct vector *deep_inventory (struct object *, int) ;
  925. struct object *environment (struct svalue *) ;
  926. struct vector *add_array (struct vector *, struct vector *) ;
  927. char *get_f_name (int) ;
  928.  
  929. void startshutdowngame (void) ;
  930.  
  931.  
  932.  
  933. void set_notify_fail_message (char *) ;
  934. int swap (struct object *) ;
  935. int transfer_object (struct object *, struct object *) ;
  936. struct vector *users (void) ;
  937. void do_write (struct svalue *) ;
  938. void log_file (char *, char *) ;
  939. int remove_call_out (struct object *, char *) ;
  940. char *create_wizard (char *, char *) ;
  941. void destruct_object (struct svalue *) ;
  942. void set_snoop (struct object *, struct object *) ;
  943. int new_set_snoop (struct object *, struct object *) ;
  944. void add_verb (char *, int) ;
  945. void ed_start (char *, char *, struct object *) ;
  946. void say (struct svalue *, struct vector *) ;
  947. void tell_room (struct object *, struct svalue *, struct vector *) ;
  948. void shout_string (char *) ;
  949. int command_for_object (char *, struct object *) ;
  950. int remove_file (char *) ;
  951. int print_file (char *, int, int) ;
  952. int print_call_out_usage (int verbose) ;
  953. int input_to (char *, int) ;
  954. int parse (char *, struct svalue *, char *, struct svalue *, int) ;
  955. struct object *object_present (struct svalue *, struct object *) ;
  956. void add_light (struct object *, int) ;
  957. int indent_program (char *) ;
  958. void call_function (struct program *, struct function *) ;
  959. void store_line_number_info (void) ;
  960. void push_constant_string (char *) ;
  961. void push_svalue (struct svalue *) ;
  962. struct variable *find_status (char *, int) ;
  963. void free_prog (struct program *, int) ;
  964. void stat_living_objects (void) ;
  965. int heart_beat_status (int verbose) ;
  966. void opcdump (void) ;
  967. void slow_shut_down (int) ;
  968. struct vector *allocate_array (int) ;
  969. void yyerror (char *) ;
  970. void reset_machine (int) ;
  971. void clear_state (void) ;
  972. void load_first_objects (void) ;
  973. void preload_objects (int) ;
  974. int random_number (int) ;
  975. void reset_object (struct object *, int) ;
  976. int replace_interactive (struct object *ob, struct object *obf, char *) ;
  977. char *get_wiz_name (char *) ;
  978. char *get_log_file (char *) ;
  979. int get_current_time (void) ;
  980. char *time_string (int) ;
  981. char *process_string (char *) ;
  982. void update_ref_counts_for_players (void) ;
  983. void count_ref_from_call_outs (void) ;
  984. void check_a_lot_ref_counts (struct program *) ;
  985. int shadow_catch_message (struct object *ob, char *str) ;
  986. struct vector *get_all_call_outs (void) ;
  987. char *read_file (char *file, int, int) ;
  988. char *read_bytes (char *file, int, int) ;
  989. int write_bytes (char *file, int, char *str) ;
  990. struct wiz_list *add_name (char *str) ;
  991. char *check_valid_path (char *, struct wiz_list *, char *, int) ;
  992. int get_line_number_if_any (void) ;
  993. void logon (struct object *ob) ;
  994. struct svalue *apply_master_ob (char *fun, int num_arg) ;
  995. void assert_master_ob_loaded();
  996. struct vector *explode_string (char *str, char *del) ;
  997. char *string_copy (char *) ;
  998. int find_call_out (struct object *ob, char *fun) ;
  999. void remove_object_from_stack (struct object *ob) ;
  1000. void compile_file (void) ;
  1001. void unlink_swap_file();
  1002. char *function_exists (char *, struct object *) ;
  1003. void set_inc_list (struct svalue *sv) ;
  1004. int legal_path (char *path) ;
  1005. struct vector *get_dir (char *path) ;
  1006. extern int rename (char *, char *) ;
  1007. void get_simul_efun (struct svalue *) ;
  1008. struct function *find_simul_efun (char *) ;
  1009. char *query_simul_efun_file_name (void) ;
  1010. struct vector *match_regexp (struct vector *v, char *pattern) ;
  1011.  
  1012.  
  1013.  
  1014. union u {
  1015.     char *string;
  1016.     int number;
  1017.     struct object *ob;
  1018.     struct vector *vec;
  1019.     struct svalue *lvalue;
  1020. };
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027. struct svalue {
  1028.     short type;
  1029.     short string_type;
  1030.     union u u;
  1031. };
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045. struct vector {
  1046.     short size;
  1047.     short ref;
  1048.  
  1049.     int extra_ref;
  1050.  
  1051.     struct wiz_list *user;     
  1052.     struct svalue item[1];
  1053. };
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059. struct lnode_def;
  1060. void free_vector (struct vector *) , free_all_values();
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068. struct control_stack {
  1069.     struct object *ob;         
  1070.     struct object *prev_ob;     
  1071.     struct program *prog;     
  1072.     int num_local_variables;     
  1073.     char *pc;
  1074.     struct svalue *fp;
  1075.     int extern_call;         
  1076.     struct function *funp;     
  1077.     int function_index_offset;     
  1078.  
  1079.     int variable_index_offset;     
  1080.     short *break_sp;
  1081. };
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110. struct object {
  1111.     unsigned short flags;     
  1112.     short total_light;
  1113.     int next_reset;         
  1114.     int time_of_ref;         
  1115.     int ref;             
  1116.  
  1117.     int extra_ref;         
  1118.  
  1119.     long swap_num;         
  1120.     struct program *prog;
  1121.     char *name;
  1122.     struct object *next_all, *next_inv, *next_heart_beat, *next_hash;
  1123.     struct object *contains;
  1124.     struct object *super;         
  1125.     struct object *shadowing;         
  1126.     struct object *shadowed;         
  1127.     struct interactive *interactive;     
  1128.     struct sentence *sent;
  1129.     struct wiz_list *user;         
  1130.     struct wiz_list *eff_user;         
  1131.     struct object *next_hashed_living;
  1132.     char *living_name;             
  1133.     struct svalue variables[1];         
  1134.      
  1135. };
  1136.  
  1137. extern struct object *load_object (char *, int, int) ,
  1138.         *find_object (char *) ;
  1139. extern struct object *get_empty_object(), *find_object (char *) ,
  1140.     *find_object2 (char *) ;
  1141. extern struct object *current_object, *command_giver;
  1142.  
  1143. extern struct object *obj_list;
  1144. extern struct object *obj_list_destruct;
  1145.  
  1146. struct value;
  1147. void remove_destructed_objects(), save_object (struct object *, char *) ,
  1148.     move_object (struct object *, struct object *) ,
  1149.     tell_object (struct object *, char *) ,
  1150.     tell_npc (struct object *, char *) ,
  1151.     add_ref (struct object *, char *) ,
  1152.     free_object (struct object *, char *) ,
  1153.     reference_prog (struct program *, char *) ;
  1154.  
  1155. int restore_object (struct object *, char *) ;
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201. struct function {
  1202.     char *name;
  1203.     unsigned short offset;     
  1204.  
  1205.     unsigned short flags;     
  1206.     unsigned short num_local;     
  1207.     unsigned short num_arg;     
  1208.  
  1209.  
  1210.     unsigned short function_index_offset;
  1211.      
  1212.  
  1213.  
  1214.     unsigned short type;     
  1215. };
  1216.  
  1217. struct variable {
  1218.     char *name;
  1219.     unsigned short type;     
  1220.     unsigned short flags;     
  1221. };
  1222.  
  1223. struct inherit {
  1224.     struct program *prog;
  1225.     unsigned short function_index_offset;
  1226.     unsigned short variable_index_offset;
  1227.     unsigned short type;
  1228. };
  1229.  
  1230. struct program {
  1231.     int ref;                 
  1232.  
  1233.     int extra_ref;             
  1234.  
  1235.     char *program;             
  1236.     char *name;                 
  1237.     int  id_number;             
  1238.  
  1239.  
  1240.     unsigned short *line_numbers;     
  1241.     struct function *functions;
  1242.     char **strings;             
  1243.     struct variable *variable_names;     
  1244.     struct inherit *inherit;         
  1245.     int total_size;             
  1246.     int heart_beat;             
  1247.  
  1248.  
  1249.      
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.     unsigned short *argument_types;
  1260.  
  1261.     unsigned short *type_start;
  1262.      
  1263.  
  1264.  
  1265.     unsigned short program_size;     
  1266.     unsigned short num_functions;
  1267.     unsigned short num_strings;
  1268.     unsigned short num_variables;
  1269.     unsigned short num_inherited;
  1270. };
  1271.  
  1272. extern struct program *current_prog;
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.    
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502. struct instr {
  1503.     short max_arg, min_arg;     
  1504.     char type[2];
  1505.     short Default;
  1506.     short ret_type;
  1507.     char *name;
  1508.     int arg_index;
  1509. };
  1510.  
  1511. extern struct instr instrs[256];
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519. struct mem_block {
  1520.     char *block;
  1521.     int current_size;
  1522.     int max_size;
  1523. };
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543. struct config {
  1544.     char *cf_name;
  1545.     int   cf_type;
  1546.     union cf {
  1547.     char *cf_str;
  1548.     int   cf_int;
  1549.     } u;
  1550. };
  1551.  
  1552. extern struct config configs[];
  1553.  
  1554. int read_config_file(char *);
  1555. void dump_config(void);
  1556. void init_global_configs(void);
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587. struct case_heap_entry { int key; short addr; short line; };
  1588.  
  1589.  
  1590. static struct mem_block mem_block[       11 ];
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614. static int exact_types;
  1615. extern int pragma_strict_types;     
  1616. extern int pragma_save_types;     
  1617. int approved_object;         
  1618.  
  1619. extern int total_num_prog_blocks, total_prog_block_size;
  1620.  
  1621. extern int num_parse_error;
  1622. extern int d_flag;
  1623. static int heart_beat;         
  1624.  
  1625. static int current_break_address;
  1626. static int current_continue_address;
  1627. static int current_case_number_heap;
  1628. static int current_case_string_heap;
  1629.  
  1630.  
  1631. static int zero_case_label;
  1632. static int current_type;
  1633.  
  1634. static int last_push_indexed;
  1635. static int last_push_local;
  1636. static int last_push_identifier;
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653. static int last_initializer_end;
  1654. static int first_last_initializer_end;
  1655.  
  1656. static struct program NULL_program;  
  1657.  
  1658. void epilog();
  1659. static int check_declared (char *str) ;
  1660. static void prolog();
  1661. static char *get_two_types (int type1, int type2) ;
  1662. void free_all_local_names(),
  1663.     add_local_name (char *, int) , smart_log (char *, int, char *) ;
  1664. extern int yylex();
  1665. extern char *findstring (char *) ;
  1666. static int verify_declared (char *) ;
  1667. static void copy_variables();
  1668. static int copy_functions (struct program *, int type) ;
  1669. void type_error (char *, int) ;
  1670.  
  1671. char *xalloc(), *string_copy();
  1672.  
  1673. extern int current_line;
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679. extern char *current_file, *inherit_file;
  1680.  
  1681.  
  1682.  
  1683.  
  1684. char **local_names;
  1685. unsigned short *type_of_locals;
  1686. int current_number_of_locals = 0;
  1687. int current_break_stack_need = 0  ,max_break_stack_need = 0;
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696. static struct mem_block type_of_arguments;
  1697.  
  1698. struct program *prog;     
  1699.  
  1700. void init_compiler(void)
  1701. {
  1702.     memset(&mem_block, 0, sizeof(struct mem_block) *        11 );
  1703.     memset(&type_of_arguments, 0, sizeof(type_of_arguments));
  1704. }
  1705.  
  1706.  
  1707.  
  1708.  
  1709. static int compatible_types(t1, t2)
  1710.     int t1, t2;
  1711. {
  1712.     if (t1 == 0     || t2 == 0    )
  1713.     return 0;
  1714.     if (t1 == t2)
  1715.     return 1;
  1716.     if (t1 == 5     || t2 == 5    )
  1717.     return 1;
  1718.     if ((t1 & 0x0400    ) && (t2 & 0x0400    )) {
  1719.     if ((t1 &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == (5    |0x0400    ) ||
  1720.         (t2 &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == (5    |0x0400    ))
  1721.         return 1;
  1722.     }
  1723.     return 0;
  1724. }
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730. static void add_arg_type(type)
  1731.     unsigned short type;
  1732. {
  1733.     struct mem_block *mbp = &type_of_arguments;
  1734.     while (mbp->current_size + sizeof type > mbp->max_size) {
  1735.     mbp->max_size <<= 1;
  1736.     mbp->block = xrealloc((char *)mbp->block, mbp->max_size);
  1737.     }
  1738.     memcpy(mbp->block + mbp->current_size, &type, sizeof type);
  1739.     mbp->current_size += sizeof type;
  1740. }
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746. static void pop_arg_stack(n)
  1747.     int n;
  1748. {
  1749.     type_of_arguments.current_size -= sizeof (unsigned short) * n;
  1750. }
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758. int get_argument_type(arg, n)
  1759.     int arg, n;
  1760. {
  1761.     return
  1762.     ((unsigned short *)
  1763.      (type_of_arguments.block + type_of_arguments.current_size))[arg - n];
  1764. }
  1765.  
  1766.  
  1767. static void add_to_mem_block(n, data, size)
  1768.     int n, size;
  1769.     char *data;
  1770. {
  1771.     struct mem_block *mbp = &mem_block[n];
  1772.     while (mbp->current_size + size > mbp->max_size) {
  1773.     mbp->max_size <<= 1;
  1774.     mbp->block = xrealloc((char *)mbp->block, mbp->max_size);
  1775.     }
  1776.     memcpy(mbp->block + mbp->current_size, data, size);
  1777.     mbp->current_size += size;
  1778. }
  1779.  
  1780. static void ins_byte(b)
  1781.     char b;
  1782. {
  1783.     add_to_mem_block(    0 , &b, 1);
  1784. }
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791. static void ins_short(l)
  1792.     short l;
  1793. {
  1794.     add_to_mem_block(    0 , (char *)&l + 0, 1);
  1795.     add_to_mem_block(    0 , (char *)&l + 1, 1);
  1796. }
  1797.  
  1798. static void upd_short(offset, l)
  1799.     int offset;
  1800.     short l;
  1801. {
  1802.     mem_block[    0 ].block[offset + 0] = ((char *)&l)[0];
  1803.     mem_block[    0 ].block[offset + 1] = ((char *)&l)[1];
  1804. }
  1805.  
  1806. static short read_short(offset)
  1807.     int offset;
  1808. {
  1809.     short l;
  1810.  
  1811.     ((char *)&l)[0] = mem_block[    0 ].block[offset + 0];
  1812.     ((char *)&l)[1] = mem_block[    0 ].block[offset + 1];
  1813.     return l;
  1814. }
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820. static void ins_long(l)
  1821.     int l;
  1822. {
  1823.     add_to_mem_block(    0 , (char *)&l+0, 1);
  1824.     add_to_mem_block(    0 , (char *)&l+1, 1);
  1825.     add_to_mem_block(    0 , (char *)&l+2, 1);
  1826.     add_to_mem_block(    0 , (char *)&l+3, 1);
  1827. }
  1828.  
  1829. static void ins_f_byte(b)
  1830.     unsigned int b;
  1831. {
  1832.     ins_byte((char)(b -     257 ));
  1833. }
  1834.  
  1835.  
  1836.  
  1837.  
  1838. static int defined_function(s, start)
  1839.     char *s;
  1840.     int start;
  1841. {
  1842.     int offset;
  1843.     struct function *funp;
  1844.     char *interned;
  1845.  
  1846.     if (interned = findstring(s))     
  1847.     for (offset = start * sizeof (struct function);
  1848.       offset < mem_block[    1 ].current_size;
  1849.       offset += sizeof (struct function))
  1850.     {
  1851.         funp = (struct function *)&mem_block[    1 ].block[offset];
  1852.         if (funp->flags &     0x8    )
  1853.         continue;
  1854.         if (funp->name == interned)
  1855.         return offset / sizeof (struct function);
  1856.     }
  1857.     return -1;
  1858. }
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864. static int comp_stackp;
  1865. int *comp_stack;
  1866.  
  1867. static void push_address() {
  1868.     if (comp_stackp >=     (configs[19].u.cf_int) ) {
  1869.     yyerror("Compiler stack overflow");
  1870.     comp_stackp++;
  1871.     return;
  1872.     }
  1873.     comp_stack[comp_stackp++] = mem_block[    0 ].current_size;
  1874. }
  1875.  
  1876. static void push_explicit(address)
  1877.     int address;
  1878. {
  1879.     if (comp_stackp >=     (configs[19].u.cf_int) ) {
  1880.     yyerror("Compiler stack overflow");
  1881.     comp_stackp++;
  1882.     return;
  1883.     }
  1884.     comp_stack[comp_stackp++] = address;
  1885. }
  1886.  
  1887. static int pop_address() {
  1888.     if (comp_stackp == 0)
  1889.     fatal("Compiler stack underflow.\n");
  1890.     if (comp_stackp >     (configs[19].u.cf_int) ) {
  1891.     --comp_stackp;
  1892.     return 0;
  1893.     }
  1894.     return comp_stack[--comp_stackp];
  1895. }
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. static void find_inherited(funp)
  1907.     struct function *funp;
  1908. {
  1909.     int i;
  1910.     struct inherit *ip;
  1911.     int num_inherits, super_length;
  1912.     char *real_name, *super_name = 0, *p;
  1913.     char *interned;
  1914.  
  1915.     real_name = funp->name;
  1916.     if (real_name[0] == ':')
  1917.     real_name = real_name + 2;     
  1918.     else if (p = strchr(real_name, ':')) {
  1919.     real_name = p+2;
  1920.     super_name = funp->name;
  1921.     super_length = real_name - super_name - 2;
  1922.     }
  1923.     num_inherits = mem_block[    5 ].current_size /
  1924.     sizeof (struct inherit);
  1925.     ip = &((struct inherit *)mem_block[    5 ].block)[num_inherits-1];
  1926.     if (interned = findstring(real_name))  
  1927.       for (; num_inherits > 0; ip--, num_inherits--) {
  1928.     if (super_name) {
  1929.         int l = strlen(ip->prog->name);     
  1930.         if (l - 2 < super_length)
  1931.         continue;
  1932.         if (strncmp(super_name, ip->prog->name + l - 2 - super_length,
  1933.             super_length) != 0)
  1934.         continue;
  1935.     }
  1936.     for (i=0; i < ip->prog->num_functions; i++) {
  1937.         if (ip->prog->functions[i].flags & (    0x2    |    0x8    ))
  1938.         continue;
  1939.         if (ip->prog->functions[i].type & 0x0800    )
  1940.         continue;
  1941.         if (ip->prog->functions[i].name != interned)
  1942.         continue;
  1943.         funp->offset = ip - (struct inherit *)mem_block[    5 ].block;
  1944.         funp->flags = ip->prog->functions[i].flags |     0x1    ;
  1945.         funp->num_local = ip->prog->functions[i].num_local;
  1946.         funp->num_arg = ip->prog->functions[i].num_arg;
  1947.         funp->type = ip->prog->functions[i].type;
  1948.         funp->type |= funp->type &     0x2000   ?
  1949.         ip->type & ~0x0800     : ip->type;
  1950.         funp->function_index_offset = i;
  1951.         return;
  1952.     }
  1953.       }
  1954.     return;
  1955. }
  1956.  
  1957. void replace_function(num, name, num_arg, num_local, offset, flags, type)
  1958. int num, num_arg, num_local, offset, flags, type;
  1959. char *name;
  1960. {
  1961.     struct function *funp;
  1962.  
  1963.     funp = (struct function *)(mem_block[    1 ].block) + num;
  1964.     if (!(funp->flags &     0x2    ) &&
  1965.     !(flags &     0x10    ) &&
  1966.     !(funp->flags &     0x1    ))
  1967.     {
  1968.     char buff[500];
  1969.     sprintf(buff, "Redeclaration of function %s.", name);
  1970.     yyerror(buff);
  1971.     return;
  1972.     }
  1973.      
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.     if ((funp->type & 0x0200    ) &&
  1985.     !(funp->flags &     0x10    ) &&
  1986.     !(flags &     0x10    ))
  1987.     {
  1988.     char *p = (char *)alloca(80 + strlen(name));
  1989.     sprintf(p, "Illegal to redefine 'nomask' function \"%s\"",name);
  1990.     yyerror(p);
  1991.     }
  1992.     if (exact_types && funp->type != 0    ) {
  1993.     int i;
  1994.     if (funp->num_arg != num_arg && !(funp->type & 0x4000    ))
  1995.         yyerror("Incorrect number of arguments.");
  1996.     else if (!(funp->flags & 0x4    ))
  1997.         yyerror("Called function not compiled with type testing.");
  1998.     else {
  1999.          
  2000.         for (i=0; i < num_arg; i++) {
  2001.         }
  2002.     }
  2003.     }
  2004.      
  2005.     if (flags &     0x10    )
  2006.     return;
  2007.     funp->num_arg = num_arg;
  2008.     funp->num_local = num_local;
  2009.     funp->flags = flags;
  2010.     funp->offset = offset;
  2011.     funp->function_index_offset = 0;
  2012.     funp->type = type;
  2013.     if (exact_types)
  2014.     funp->flags |= 0x4    ;
  2015.     return;
  2016. }
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024. static int define_new_function(name, num_arg, num_local, offset, flags, type)
  2025.     char *name;
  2026.     int num_arg, num_local;
  2027.     int offset, flags, type;
  2028. {
  2029.     int num;
  2030.     struct function fun;
  2031.     unsigned short argument_start_index;
  2032.  
  2033.     num = defined_function(name, 0);
  2034.     if (num >= 0) {
  2035.     int save_num;
  2036.  
  2037.      
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.     do {
  2047.         replace_function(num, name, num_arg, num_local, offset, flags,type);
  2048.         save_num = num;
  2049.         num = defined_function(name, num+1);
  2050.     } while (num >= 0);
  2051.     return save_num;
  2052.     }
  2053.     if (strcmp(name, "heart_beat") == 0)
  2054.     heart_beat = mem_block[    1 ].current_size /
  2055.         sizeof (struct function);
  2056.     fun.name = make_shared_string(name);
  2057.     fun.offset = offset;
  2058.     fun.flags = flags;
  2059.     fun.num_arg = num_arg;
  2060.     fun.num_local = num_local;
  2061.     fun.function_index_offset = 0;
  2062.     fun.type = type;
  2063.     if (exact_types)
  2064.     fun.flags |= 0x4    ;
  2065.     num = mem_block[    1 ].current_size / sizeof fun;
  2066.      
  2067.     add_to_mem_block(    1 , (char *)&fun, sizeof fun);
  2068.  
  2069.     if (exact_types == 0 || num_arg == 0) {
  2070.     argument_start_index =     65535 ;
  2071.     } else {
  2072.     int i;
  2073.  
  2074.      
  2075.  
  2076.  
  2077.     argument_start_index =
  2078.         mem_block[6 ].current_size /
  2079.         sizeof (unsigned short);
  2080.     for (i=0; i < num_arg; i++) {
  2081.         add_to_mem_block(6 , &type_of_locals[i],
  2082.                  sizeof type_of_locals[i]);
  2083.     }
  2084.     }
  2085.     add_to_mem_block(7 , &argument_start_index,
  2086.              sizeof argument_start_index);
  2087.     return num;
  2088. }
  2089.  
  2090. static void define_variable(name, type, flags)
  2091.     char *name;
  2092.     int type;
  2093.     int flags;
  2094. {
  2095.     struct variable dummy;
  2096.     int n;
  2097.  
  2098.     n = check_declared(name);
  2099.     if (n != -1 && (((struct variable *)mem_block[    3 ].block + (n)) ->type & 0x0200    )) {
  2100.     char *p = (char *)alloca(80 + strlen(name));
  2101.     sprintf(p, "Illegal to redefine 'nomask' variable \"%s\"", name);
  2102.     yyerror(p);
  2103.     }
  2104.     dummy.name = make_shared_string(name);
  2105.     dummy.type = type;
  2106.     dummy.flags = flags;
  2107.     add_to_mem_block(    3 , (char *)&dummy, sizeof dummy);
  2108. }
  2109.  
  2110. short store_prog_string(str)
  2111.     char *str;
  2112. {
  2113.     short i;
  2114.     char **p;
  2115.  
  2116.     p = (char **) mem_block[    2 ].block;
  2117.     str = make_shared_string(str);
  2118.     for (i=mem_block[    2 ].current_size / sizeof str -1; i>=0; --i)
  2119.     if (p[i] == str)  {
  2120.         free_string(str);  
  2121.         return i;
  2122.     }
  2123.  
  2124.     add_to_mem_block(    2 , &str, sizeof str);
  2125.     return mem_block[    2 ].current_size / sizeof str - 1;
  2126. }
  2127.  
  2128. void add_to_case_heap(block_index,entry)
  2129.     int block_index;
  2130.     struct case_heap_entry *entry;
  2131. {
  2132.     char *heap_start;
  2133.     int offset,parent;
  2134.     int current_heap;
  2135.  
  2136.     if ( block_index ==     8  )
  2137.         current_heap = current_case_number_heap;
  2138.     else
  2139.         current_heap = current_case_string_heap;
  2140.     offset = mem_block[block_index].current_size - current_heap;
  2141.     add_to_mem_block(block_index, (char*)entry, sizeof(*entry) );
  2142.     heap_start = mem_block[block_index].block + current_heap;
  2143.     for ( ; offset; offset = parent ) {
  2144.         parent = ( offset - sizeof(struct case_heap_entry) ) >> 1 ;
  2145.         parent &= -sizeof(struct case_heap_entry) ;
  2146.         if ( ((struct case_heap_entry*)(heap_start+offset))->key <
  2147.              ((struct case_heap_entry*)(heap_start+parent))->key )
  2148.         {
  2149.             *(struct case_heap_entry*)(heap_start+offset) =
  2150.             *(struct case_heap_entry*)(heap_start+parent);
  2151.             *(struct case_heap_entry*)(heap_start+parent) = *entry;
  2152.         }
  2153.     }
  2154. }
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160. static void transfer_init_control() {
  2161.     if (mem_block[    0 ].current_size - 2 == last_initializer_end)
  2162.     mem_block[    0 ].current_size -= 3;
  2163.     else {
  2164.      
  2165.  
  2166.  
  2167.  
  2168.     upd_short(last_initializer_end,
  2169.           mem_block[    0 ].current_size);
  2170.     }
  2171. }
  2172.  
  2173. void add_new_init_jump();
  2174.  
  2175. typedef union
  2176. {
  2177.     int number;
  2178.     unsigned int address;     
  2179.     char *string;
  2180.     short type;
  2181.     struct { int key; char block; } case_label;
  2182.     struct function *funp;
  2183. } YYSTYPE;
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397. short yylhs[] = {                                        -1,
  2398.     0,   53,   53,   55,   55,   56,   51,   17,   17,   22,
  2399.    22,   58,   59,   54,   54,   54,   61,   61,   14,   14,
  2400.    23,   23,   19,   19,   19,   19,   19,   19,   20,   20,
  2401.    15,   34,   21,   21,   16,   16,   16,   16,   16,   16,
  2402.    16,   60,   60,   62,   63,   62,   57,   64,   64,   67,
  2403.    66,   66,   65,   65,   65,   68,   68,   68,   68,   68,
  2404.    68,   68,   68,   68,   68,   68,   68,   68,   77,   78,
  2405.    70,   79,   71,   81,   82,   83,   84,   72,   80,   80,
  2406.    85,   73,   74,   74,   30,   30,    2,    2,    4,    4,
  2407.     5,    5,    6,    6,    6,    7,    7,    7,    7,    7,
  2408.     8,    8,    8,    9,    9,    9,   10,   10,   10,   10,
  2409.    11,   11,   12,   12,   12,   12,   75,   37,   86,   37,
  2410.    52,   52,   52,   36,   87,   88,   36,    1,    1,    1,
  2411.     1,    1,    1,    1,    1,    1,    1,    1,   76,   76,
  2412.     3,    3,    3,   18,   18,   24,   24,   24,   25,   25,
  2413.    40,   89,   40,   38,   90,   38,   39,   39,   41,   41,
  2414.    42,   42,   44,   44,   44,   45,   45,   45,   45,   45,
  2415.    43,   43,   43,   46,   46,   46,   47,   47,   47,   47,
  2416.    35,   35,   48,   48,   48,   48,   48,   48,   49,   49,
  2417.    49,   50,   50,   50,   50,   50,   50,   50,   50,   50,
  2418.    50,   94,   91,   92,   93,   13,   13,   32,   32,   32,
  2419.    32,   33,   27,   26,   26,   95,   31,   96,   31,   28,
  2420.    28,   28,   29,   29,   99,   69,   97,   98,   98,
  2421. };
  2422. short yylen[] = {                                         2,
  2423.     1,    3,    0,    0,    1,    4,    1,    0,    1,    1,
  2424.     1,    0,    0,    9,    3,    1,    3,    2,    0,    1,
  2425.     1,    3,    1,    1,    1,    1,    1,    1,    0,    2,
  2426.     2,    4,    1,    0,    1,    1,    1,    1,    1,    1,
  2427.     1,    1,    3,    2,    0,    5,    4,    0,    4,    2,
  2428.     1,    3,    0,    2,    2,    2,    1,    1,    1,    1,
  2429.     1,    1,    1,    2,    1,    1,    2,    2,    0,    0,
  2430.     7,    0,    8,    0,    0,    0,    0,   13,    0,    1,
  2431.     0,    6,    3,    5,    1,    1,    1,    3,    1,    3,
  2432.     1,    3,    1,    3,    3,    1,    3,    3,    3,    3,
  2433.     1,    3,    3,    1,    3,    3,    1,    3,    3,    3,
  2434.     1,    3,    1,    2,    2,    2,    2,    1,    0,    4,
  2435.     1,    3,    3,    1,    0,    0,    7,    1,    1,    1,
  2436.     1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
  2437.     0,    1,    2,    1,    3,    0,    1,    2,    3,    5,
  2438.     1,    0,    4,    1,    0,    4,    1,    3,    1,    3,
  2439.     1,    3,    1,    3,    3,    1,    3,    3,    3,    3,
  2440.     1,    3,    3,    1,    3,    3,    1,    3,    3,    3,
  2441.     1,    2,    1,    2,    2,    2,    2,    2,    1,    2,
  2442.     2,    1,    1,    1,    1,    3,    1,    1,    1,    5,
  2443.     5,    0,    5,    7,    9,    0,    3,    1,    1,    6,
  2444.     4,    1,    1,    1,    3,    0,    5,    0,    7,    1,
  2445.     2,    3,    1,    1,    0,    4,    4,    0,    2,
  2446. };
  2447. short yydefred[] = {                                      3,
  2448.     0,    0,   24,   25,   23,   28,   26,   27,    0,    0,
  2449.     0,    0,   16,    9,    0,    0,    0,   30,   35,   36,
  2450.    37,    0,   38,   39,   40,   41,   33,   31,    5,    2,
  2451.     0,   15,    0,    0,    0,    0,    0,   43,    6,    0,
  2452.     0,    0,    0,    0,    0,    0,   21,    0,    0,  212,
  2453.     0,    0,    7,    0,    0,    0,    0,  202,    0,    0,
  2454.     0,    0,  216,    0,  192,    0,  194,    0,  177,  121,
  2455.     0,    0,    0,    0,    0,    0,  161,  163,    0,    0,
  2456.   181,  183,    0,  195,   46,  197,  198,  199,   13,   18,
  2457.     0,    0,  134,  135,  138,  136,  137,  129,  130,  131,
  2458.   132,  133,  128,    0,    0,    0,    0,    0,    0,    0,
  2459.   224,  223,  221,    0,    0,  186,    0,    0,    0,    0,
  2460.   118,  188,  187,    0,    0,  190,  191,    0,  182,  152,
  2461.   155,    0,  125,    0,    0,    0,    0,    0,    0,    0,
  2462.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2463.     0,   17,   22,  123,    0,    0,    0,    0,    0,  144,
  2464.     0,    0,    0,    0,  196,    0,    0,  222,  122,    0,
  2465.     0,    0,    0,    0,  162,    0,    0,    0,    0,    0,
  2466.     0,    0,    0,    0,    0,  178,  179,  180,  218,    0,
  2467.    11,   48,   14,   10,    0,    0,    0,    0,    0,    0,
  2468.     0,    0,   32,    0,    0,  153,  156,  126,    0,    0,
  2469.   211,    0,    0,    0,  203,  200,  145,  201,    0,  149,
  2470.   120,  217,    0,    0,    0,    0,    0,    0,    0,    0,
  2471.     0,    0,    0,    0,   66,    0,    0,   65,    0,    0,
  2472.    57,   58,   59,   60,   61,   62,   63,    0,    0,    0,
  2473.     0,    0,    0,    0,    0,    0,    0,  210,   55,    0,
  2474.     0,   67,   74,    0,   68,  214,  113,    0,    0,    0,
  2475.     0,    0,    0,    0,    0,    0,    0,    0,    0,  107,
  2476.   111,    0,   86,    0,  117,    0,    0,    0,   56,   47,
  2477.    54,   64,    0,    0,  225,    0,  204,    0,  150,  127,
  2478.   219,    0,    0,    0,  115,    0,  114,  116,    0,    0,
  2479.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2480.     0,    0,    0,    0,    0,    0,   83,   50,   49,    0,
  2481.     0,    0,    0,  207,    0,  227,    0,    0,   81,  112,
  2482.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2483.     0,    0,    0,  108,  109,  110,  215,    0,   52,    0,
  2484.     0,    0,  226,  205,   75,    0,   84,   70,    0,  229,
  2485.     0,   82,    0,    0,    0,   71,    0,   76,   73,    0,
  2486.     0,   77,    0,   78,
  2487. };
  2488. short yydgoto[] = {                                       1,
  2489.   104,  272,  158,  273,  274,  275,  276,  277,  278,  279,
  2490.   280,  281,  253,   43,   44,   27,  286,  159,   10,   45,
  2491.    28,  193,   46,  161,  162,  282,  283,   63,   64,  284,
  2492.    65,   66,   67,   68,   69,   70,  237,   71,   72,   73,
  2493.    74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
  2494.    84,  121,    2,   12,   30,   13,  238,   35,  151,   16,
  2495.    47,   17,   36,  212,  239,  287,  288,  240,  241,  242,
  2496.   243,  244,  245,  246,  247,  248,  249,  373,  250,  338,
  2497.   303,  371,  380,  383,  366,  166,  173,  223,  170,  171,
  2498.    86,   87,   88,  114,  124,  209,  251,  363,  333,
  2499. };
  2500. short yysindex[] = {                                      0,
  2501.     0, -140,    0,    0,    0,    0,    0,    0,   20, -140,
  2502.  1306,   30,    0,    0, -172,   54,   79,    0,    0,    0,
  2503.     0, -143,    0,    0,    0,    0,    0,    0,    0,    0,
  2504.     0,    0,   20,   85,  119,   90, -118,    0,    0, -140,
  2505.  1376,    0,  131,  -26,  699,  156,    0, 1613,    0,    0,
  2506.   394,  394,    0,  172,  185,    0, -232,    0, 1556, 1491,
  2507.  1556, 1556,    0, -111,    0, 1601,    0, 1556,    0,    0,
  2508.   -43,  -89,  171,  144,  205,  206,    0,    0,   50,  239,
  2509.     0,    0,  -73,    0,    0,    0,    0,    0,    0,    0,
  2510.   -18, -140,    0,    0,    0,    0,    0,    0,    0,    0,
  2511.     0,    0,    0, 1568, 1503,    0,  -73,    0, 1376, 1376,
  2512.     0,    0,    0,  223,  -99,    0, 1376, 1376,   20,  228,
  2513.     0,    0,    0,  273, -232,    0,    0, 1376,    0,    0,
  2514.     0, 1568,    0, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
  2515.  1568, 1568, 1568, 1568, 1568, 1556, 1556, 1556, -219, 1376,
  2516.   -11,    0,    0,    0,  246,  263, 1376,  203,  291,    0,
  2517.   244,  302,  290,  309,    0,  315, 1376,    0,    0, 1568,
  2518.  1568,  144, 1568,  205,    0,  -79,  -79,  -79,  -79,   50,
  2519.    50,  -79,  -79,  239,  239,    0,    0,    0,    0,  -84,
  2520.     0,    0,    0,    0, 1376, 1376,  321,  325, 1376,  331,
  2521.  1376, 1568,    0, 1376,  333,    0,    0,    0,  347, 1376,
  2522.     0, 1056,  354,  355,    0,    0,    0,    0,  342,    0,
  2523.     0,    0,  349, 1376,  316, 1562,  370, 1376,  365,  373,
  2524.   385,  367,   62,  369,    0,   20,  372,    0,  304, 1153,
  2525.     0,    0,    0,    0,    0,    0,    0,  376,  130,  132,
  2526.  1171,  394,  398, 1376, 1568, 1568,  399,    0,    0, 1376,
  2527.     0,    0,    0, 1376,    0,    0,    0,  164,    5,  165,
  2528.   173,  341,  361,  411, -186,  -29,  -78,  232,  386,    0,
  2529.     0,  414,    0,  -56,    0,  197,  412,  426,    0,    0,
  2530.     0,    0,  432, 1171,    0,  354,    0,  354,    0,    0,
  2531.     0,  433, 1376,  434,    0,   -5,    0,    0,    5,    5,
  2532.     5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
  2533.     5,    5,    5,    5,  196,   62,    0,    0,    0,   20,
  2534.  1376,  175,  168,    0,  443,    0,    0,  429,    0,    0,
  2535.   361,  411, -186,  -29,  -29,  -78,  -78,  -78,  -78,  232,
  2536.   232,  386,  386,    0,    0,    0,    0,  431,    0,  450,
  2537.   452, 1171,    0,    0,    0, 1171,    0,    0, 1376,    0,
  2538.  1376,    0, 1171,  454,  437,    0,  444,    0,    0, 1376,
  2539.   461,    0, 1171,    0,
  2540. };
  2541. short yyrindex[] = {                                      0,
  2542.     0, 1244,    0,    0,    0,    0,    0,    0,  237, 1386,
  2543.   -28, 1233,    0,    0,    0,    0,  451,    0,    0,    0,
  2544.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2545.    31,    0,  237,    0,    0,    0,    0,    0,    0, 1482,
  2546.     0,   94,    0,  237,  -27,  471,    0,    0,  -37,    0,
  2547.     0,    0,    0,    0,    0,   23,    0,    0,    0,    0,
  2548.     0,    0,    0,  478,    0,   83,    0,    0,    0,    0,
  2549.   621,  463,  174, 1222, 1125,  729,    0,    0,  511,  400,
  2550.     0,    0,  326,    0,    0,    0,    0,    0,    0,    0,
  2551.     0, 1395,    0,    0,    0,    0,    0,    0,    0,    0,
  2552.     0,    0,    0,    0,    0,  123,    0,  267,    0,    0,
  2553.     0,    0,    0,    0,   83,    0,  395,  430,  486,  475,
  2554.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2555.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2556.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2557.     0,    0,    0,    0,    0,    0,    0,    0,   -7,    0,
  2558.     0,  438,    0,    0,    0,    0,  493,    0,    0,    0,
  2559.     0, 1224,    0, 1145,    0,  807,  847,  870,  984,  565,
  2560.   588, 1032, 1048,  423,  470,    0,    0,    0,    0,  475,
  2561.     0,    0,    0,    0,    0,    0,  475,    0,   -3,    0,
  2562.   445,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2563.     0,  -93,  495,    0,    0,    0,    0,    0,    0,    0,
  2564.     0,    0,    0,  493,  475,    0,    0,  480,    0,    0,
  2565.     0,    0,    0,    0,    0,  237,  475,    0,    0,  -93,
  2566.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2567.    -4,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2568.    15,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2569.     0,  -46,  -30,  146,   38,   11,  -21,  720,  662,    0,
  2570.     0,  -45,    0,    0,    0,    0,    0,  483,    0,    0,
  2571.     0,    0,    0,   -4,    0,   17,    0,  495,    0,    0,
  2572.     0,  475,  484,  475,    0,    0,    0,    0,    0,    0,
  2573.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2574.     0,    0,    0,    0,    0,    0,    0,    0,    0,  237,
  2575.     0,    0, 1100,    0,    0,    0,  180,    0,    0,    0,
  2576.   -14,  155,   99,   98,  779,   39,  111,  907,  959,  769,
  2577.   774,  687,  695,    0,    0,    0,    0,    0,    0,  475,
  2578.     0,   -4,    0,    0,    0,   -4,    0,    0,    0,    0,
  2579.   484,    0,   -4,  475,    0,    0,    0,    0,    0,  503,
  2580.     0,    0,   -4,    0,
  2581. };
  2582. short yygindex[] = {                                      0,
  2583.   479,  277,  -95,  242,  243,  247,   67,  -88,   63, -101,
  2584.  -133,    0,   45,    0,  552,  -17,  166,    0,    0,  148,
  2585.     0,    0,    0,    0,    0,    0,    0,  408,  -10,  241,
  2586.     0, 1897,    0,    0,    0,  -62, 1375,  397,    0, -151,
  2587.   440,  441,  501,  442,    0,  183,  250,  521,    0,  -22,
  2588.     0, 1796,    0,    0,    0,    0,  425,    0,    0,  546,
  2589.   489,    0,    0,    0,  344,  255,    0,  114,    0,    0,
  2590.     0,    0,    0,    0,    0,    0,    0,    0,    0, -325,
  2591.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2592.     0,    0,    0,    0,    0,    0,    0,    0,    0,
  2593. };
  2594.  
  2595. short yytable[] = {                                     208,
  2596.   208,  327,  224,  208,  208,  208,  208,  208,  211,  208,
  2597.    87,   85,  213,   34,   34,   14,   96,  150,  206,   96,
  2598.   208,  208,  208,  208,  208,  208,   88,   87,  107,  107,
  2599.   317,   53,  316,  142,  132,  340,   96,  143,   96,  111,
  2600.    96,  154,  119,   88,  269,  375,  113,  191,   93,  270,
  2601.   220,   93,  111,  208,  381,  208,  208,  206,  119,  209,
  2602.   209,   14,  223,  209,  209,  209,  209,  209,   93,  209,
  2603.    12,  205,   96,  140,   44,   91,   98,  112,   91,   98,
  2604.   209,  209,  209,  209,  209,  209,  208,  208,   29,   44,
  2605.   112,   45,  144,   87,  145,   91,   98,   57,   98,   31,
  2606.    98,  269,   96,  299,   93,  312,  270,  193,  313,   88,
  2607.   208,  192,   32,  209,  168,  209,  209,  142,  309,  193,
  2608.   193,  143,   33,  193,  193,  193,  193,  193,  257,  193,
  2609.   271,   91,   98,   34,   93,   94,   92,   44,   94,   92,
  2610.   193,  193,  193,   39,  193,  193,  209,  209,  100,   11,
  2611.    41,  100,   44,   42,   45,   94,   92,   18,   40,  184,
  2612.   184,   91,   98,  184,  184,  184,  184,  184,  100,  184,
  2613.   100,   89,  100,  193,   15,  193,  193,    3,  126,  127,
  2614.   184,  184,  184,  131,  184,  184,   89,  271,  354,  355,
  2615.   356,   94,   92,  300,  236,   90,    4,    5,   37,   92,
  2616.     6,    7,    8,   89,  100,  125,  193,  193,   69,   91,
  2617.    72,  109,   90,  193,  124,  184,  184,  124,  352,  353,
  2618.    80,   94,   92,  119,  110,  346,  347,  348,  349,  107,
  2619.   130,  124,  124,  133,  100,  208,  208,  134,   80,   89,
  2620.   208,  208,  135,   34,   34,  149,  184,  184,   90,  140,
  2621.   318,  141,  319,  152,  208,  208,  208,  208,  208,  208,
  2622.   208,  208,  157,  314,  315,  143,  124,  142,  165,   89,
  2623.    96,   96,   96,   96,  320,  147,  321,  208,   90,  224,
  2624.   146,  208,   34,   90,  164,  148,  208,  267,  208,  195,
  2625.   208,  208,  208,  208,  208,  209,  209,   69,  124,   72,
  2626.   209,  209,   93,  185,  185,   93,  196,  185,  185,  185,
  2627.   185,  185,  167,  185,  209,  209,  209,  209,  209,  209,
  2628.   209,  209,  180,  181,  185,  185,  185,  198,  185,  185,
  2629.    98,   98,   98,   98,  199,  193,  200,  209,  266,  223,
  2630.   334,  209,  335,  268,  267,  201,  209,  202,  209,  203,
  2631.   209,  209,  209,  209,  209,  193,  193,  193,  204,  185,
  2632.   185,  215,  189,  189,  295,  216,  189,  189,  189,  189,
  2633.   189,  218,  189,  222,  193,  193,  193,  193,  344,  345,
  2634.   350,  351,  210,  189,  189,  189,  224,  189,  189,   94,
  2635.   185,  185,   94,  184,  185,  184,  184,  252,  254,  255,
  2636.   268,  193,  100,  100,  100,  100,  256,  332,  258,  260,
  2637.   326,  193,  263,  193,  184,  184,  184,  184,  189,  189,
  2638.    85,  213,  323,  262,  264,  265,  285,  322,  290,  208,
  2639.   289,  293,  324,  105,  292,  294,   87,  174,  297,  301,
  2640.   174,  193,  174,  174,  174,   96,  305,  307,  311,  189,
  2641.   189,  184,   88,  184,  310,  308,  325,  174,  174,  174,
  2642.   175,  174,  174,  175,  309,  175,  175,  175,  328,  330,
  2643.   329,  331,  357,  336,  339,  370,  361,   93,  362,  372,
  2644.   175,  175,  175,  364,  175,  175,  376,  365,  367,  209,
  2645.   368,  369,  174,  174,  377,  378,  384,  136,  137,  138,
  2646.   139,  382,  379,  154,   91,   98,  154,  176,    8,   42,
  2647.   176,   20,  176,  176,  176,  175,  175,  220,  119,  141,
  2648.   154,  154,  146,  174,  174,  154,    8,  176,  176,  176,
  2649.   147,  176,  176,  141,  140,  206,  141,  148,  139,  185,
  2650.   185,   51,   79,   79,  128,  306,  175,  175,  171,  193,
  2651.   341,  171,  342,    9,  171,  154,  189,  343,  185,  185,
  2652.   185,  185,  176,  176,   94,   92,  358,  207,  171,  171,
  2653.   171,  172,  171,  171,  174,  194,  175,  100,   38,  116,
  2654.   153,  122,  123,  291,  359,  193,    0,  154,  129,  184,
  2655.     0,    0,    0,  176,  176,  185,    0,  185,  189,  189,
  2656.     0,    0,  172,  171,  171,  172,    0,    0,  172,    0,
  2657.     0,    0,   89,    0,    0,    0,    0,  189,  189,  189,
  2658.   189,   90,  172,  172,  172,  173,  172,  172,  173,    0,
  2659.     0,  173,    0,    0,  171,  171,  176,  177,  178,  179,
  2660.   124,    0,  182,  183,    0,  173,  173,  173,    0,  173,
  2661.   173,    0,    0,    0,  189,    0,  189,  172,  172,    0,
  2662.     0,  151,    0,    0,  151,   49,  186,  187,  188,    0,
  2663.    50,    0,  174,  174,    0,    0,   53,    0,  151,  151,
  2664.   173,  173,    0,  151,    0,    0,    0,    0,  172,  172,
  2665.     0,  174,  174,  174,  174,  175,  175,    0,    0,  104,
  2666.    54,   55,  104,   56,  104,    0,  104,    0,    0,    0,
  2667.    57,  173,  173,  151,  175,  175,  175,  175,    0,  104,
  2668.     0,  104,    0,  104,  105,    0,   58,  105,  174,  105,
  2669.   174,  105,  106,  185,    0,  106,  154,  106,    0,  106,
  2670.     0,    0,  176,  176,  105,  151,  105,    0,  105,    0,
  2671.     0,  175,  106,  175,  106,  104,  106,  101,    0,    0,
  2672.   101,  176,  176,  176,  176,    0,  166,    0,    0,  166,
  2673.     0,    0,  166,    0,    0,    0,    0,  101,    0,  101,
  2674.   105,  101,    0,  171,  171,  104,  166,  166,  106,    0,
  2675.     0,  166,  189,    0,    0,    0,    0,    0,  176,    0,
  2676.   176,    0,  171,  171,  171,  171,  102,    0,    0,  102,
  2677.   105,  103,    0,  101,  103,    0,   95,    0,  106,   95,
  2678.     0,  166,  166,    0,    0,    0,  102,    0,  102,    0,
  2679.   102,  103,    0,  103,    0,  103,   95,  172,  172,  171,
  2680.     0,  171,    0,  101,  164,    0,    0,  164,    0,    0,
  2681.   164,    0,  166,  166,    0,    0,  172,  172,  172,  172,
  2682.   173,  173,  102,    0,  164,  164,  174,  103,    0,  164,
  2683.     0,    0,   95,    0,    0,    0,    0,    0,    0,  173,
  2684.   173,  173,  173,    0,  168,    0,    0,  168,    0,  175,
  2685.   168,    0,  102,  172,    0,  172,    0,  103,    0,  164,
  2686.   164,    0,   95,    0,  168,  168,    0,  170,    0,  168,
  2687.   170,    0,    0,  170,    0,    0,  173,    0,  173,    0,
  2688.     0,    0,    0,    0,    0,    0,    0,  170,  170,  154,
  2689.   164,  164,  170,    0,    0,    0,  176,    0,    0,  168,
  2690.   168,    0,    0,    0,   97,    0,    0,   97,    0,    0,
  2691.     0,    0,    0,  104,  104,  104,  104,    0,    0,    0,
  2692.     0,    0,  170,  170,   97,    0,   97,    0,   97,    0,
  2693.   168,  168,    0,   19,    0,    0,    0,  171,  105,  105,
  2694.   105,  105,    0,   20,    0,    0,  106,  106,  106,  106,
  2695.   104,    0,  104,  170,  170,    0,   99,    0,    0,   99,
  2696.    97,  166,  166,    0,    0,    0,    0,   21,    0,    0,
  2697.     0,  101,  101,  101,  101,  105,   99,  105,   99,    0,
  2698.    99,  165,    0,  106,  165,  106,    0,  165,    0,    0,
  2699.    97,  172,   23,   24,   25,    0,    0,    0,   26,    0,
  2700.     0,  165,  165,    0,    0,    0,  165,    0,  101,    0,
  2701.   101,    0,   99,    0,  173,    0,    0,    0,    0,    0,
  2702.   102,  102,  102,  102,    0,  103,  103,  103,  103,  167,
  2703.    95,    0,  167,   95,    0,  167,  165,  165,    0,  164,
  2704.   164,    0,   99,    0,    0,  169,    0,  151,  169,  167,
  2705.   167,  169,    0,    0,  167,   60,    0,  102,    0,  102,
  2706.    61,    0,  103,    0,  103,  169,  169,  165,  165,    0,
  2707.   169,    0,    0,    0,  235,    0,    0,    0,    0,  168,
  2708.   168,    0,    0,    0,  167,  167,    0,    0,  104,    0,
  2709.     0,    0,    0,    0,    0,    0,    0,    0,    0,  228,
  2710.   169,  169,  170,  170,  228,    0,    0,    0,    0,    0,
  2711.     0,    0,    0,  105,    0,  167,  167,    0,  228,    0,
  2712.     0,  106,    0,    0,    0,  159,    0,    0,  159,    0,
  2713.     0,  169,  169,    0,    0,    0,    0,    0,  192,    0,
  2714.     0,   62,  159,  159,    0,  160,  101,  159,  160,    0,
  2715.     0,    0,   60,    0,    0,  166,    0,   61,   97,   97,
  2716.    97,   97,  160,  160,    0,    0,    0,  160,    0,    0,
  2717.    60,  235,    0,    0,    0,   61,    0,  159,  159,    0,
  2718.     0,    0,  228,    0,  228,  228,    0,    0,    0,  235,
  2719.     0,    0,    4,    0,    0,  102,    0,  160,  160,    0,
  2720.   103,    0,    0,    1,    0,   95,    0,    0,  159,  159,
  2721.    99,   99,   99,   99,    0,    0,  165,  165,    0,    0,
  2722.     0,    0,  157,    0,  158,  157,    0,  158,  160,  160,
  2723.     0,    0,    0,  164,    4,  192,    0,    0,   62,  157,
  2724.   157,  158,  158,    0,  157,   29,  158,    0,    0,    0,
  2725.     0,    0,    0,  192,    0,    0,   62,    0,    0,    0,
  2726.     0,    0,    0,    0,  167,  167,    0,    0,    0,    0,
  2727.     0,  226,    0,  168,  157,    0,  158,    0,    0,    0,
  2728.   169,  169,    0,    0,    0,    0,  227,   49,    0,    0,
  2729.    19,  228,   50,   51,   52,    0,  170,    0,   53,    0,
  2730.    20,    0,    0,    0,    0,  157,  157,  158,  158,    0,
  2731.     0,    0,    0,    0,    0,  228,    0,    0,  229,    0,
  2732.   230,  231,   54,   55,   21,   56,    0,    0,  232,    0,
  2733.   228,  228,   57,   97,    0,  228,  228,  228,  228,    0,
  2734.     0,    0,  228,    0,    0,    0,    0,    0,   58,   23,
  2735.    24,   25,    0,    0,   59,   26,    0,  159,  159,    0,
  2736.     0,  228,  228,  228,  228,  228,  228,  228,  226,  228,
  2737.     0,    0,  228,    0,    0,   60,  228,  160,  160,    0,
  2738.    61,    0,    0,  227,   49,   99,   48,   29,  228,   50,
  2739.    51,   52,  228,    0,  120,   53,   29,    0,  228,    0,
  2740.     0,  227,   49,    0,    0,    0,  228,   50,   51,   52,
  2741.   165,    0,    0,   53,    0,  229,    0,  230,  231,   54,
  2742.    55,    0,   56,    0,    0,  232,    0,    0,    0,   57,
  2743.     0,    0,    0,  229,    0,  230,  231,   54,   55,  120,
  2744.    56,    0,    0,  232,    0,   58,    0,   57,    0,    0,
  2745.     0,   59,    0,    0,  157,  157,  158,  158,  167,    0,
  2746.     0,   62,    0,   58,    4,    0,    0,    4,    0,   59,
  2747.     0,    0,    0,    0,  169,   29,    0,    4,   29,    0,
  2748.   233,  234,   19,   29,  190,    0,    0,    0,   29,    0,
  2749.    60,  197,    0,    0,    0,   61,    0,    0,    0,    0,
  2750.     0,    4,   60,    0,    0,    0,    0,   61,    4,    0,
  2751.     4,    0,   29,    0,    0,    0,    0,    0,    0,   29,
  2752.     0,    0,    0,    0,  228,  228,    4,    4,    4,    4,
  2753.     4,    0,    4,    4,    4,    4,    0,   29,   29,   29,
  2754.    19,  118,    0,   29,  225,    0,    0,    0,    0,    0,
  2755.    20,  159,    0,  118,    0,  105,    0,    0,    0,    0,
  2756.    61,    0,  261,    0,    0,    0,    0,   60,    0,    0,
  2757.     0,  160,   61,  117,   21,    0,   62,  233,  234,    0,
  2758.   259,   22,  103,    0,    0,  117,    0,    0,   62,    0,
  2759.     0,   48,    0,    0,  302,  233,  234,    0,  304,   23,
  2760.    24,   25,    0,    0,    0,   26,    0,   49,    0,    0,
  2761.     0,    0,   50,   51,   52,    0,    0,   29,   53,    0,
  2762.    29,  103,    0,    0,    0,    0,   29,    0,    0,   29,
  2763.    29,    0,    0,  103,    0,    0,    0,  337,    0,   29,
  2764.     0,   62,   54,   55,    0,   56,    0,    0,  157,    0,
  2765.   158,    0,   57,   62,   29,   29,    0,    0,    0,    0,
  2766.     0,   29,    0,   29,   29,  360,    0,    0,   58,    0,
  2767.     0,    0,    0,    0,   59,    0,    0,    0,    0,   29,
  2768.    29,   29,    0,    0,    0,   29,    0,    0,   29,   29,
  2769.    29,    0,    0,    0,   29,    0,    0,    0,    0,    0,
  2770.     0,    0,    0,  374,    0,  337,   48,    0,    0,    0,
  2771.     0,    0,    0,   29,  337,    0,   29,    0,   48,    0,
  2772.     0,    0,   49,    0,    0,   19,   29,   50,   51,   52,
  2773.     0,    0,    0,   53,   49,   20,    0,    0,    0,   50,
  2774.    51,   52,    0,    0,    0,   53,    0,    0,    0,    0,
  2775.    29,   29,    0,    0,    0,    0,    0,   54,   55,   21,
  2776.    56,    0,    0,    0,    0,    0,    0,   57,    0,   54,
  2777.    55,    0,   56,    0,    0,   29,   29,   29,    0,   57,
  2778.     0,   29,    0,   58,   23,   24,   25,   49,    0,   59,
  2779.    26,    0,   50,   51,   52,   58,   85,    0,   53,   49,
  2780.     0,   59,    0,    0,   50,   51,   52,    0,    0,    0,
  2781.    53,    0,    0,    0,    0,    0,    0,   93,   94,   95,
  2782.    96,    0,   54,   55,    0,   56,    0,    0,    0,    0,
  2783.     0,    0,   57,    0,   54,   55,   97,   56,  126,  127,
  2784.     0,    0,    0,    0,   57,   98,    0,   99,   58,  100,
  2785.     0,  101,    0,  102,   59,    0,   93,   94,   95,   96,
  2786.    58,    0,    0,    0,  155,  156,   59,    0,   93,   94,
  2787.    95,   96,  160,  163,    0,   97,    0,    0,    0,    0,
  2788.     0,    0,    0,  169,   98,    0,   99,   97,  100,    0,
  2789.   101,    0,  102,    0,    0,    0,   98,    0,   99,    0,
  2790.   100,    0,  101,    0,  102,    0,    0,  106,  108,    0,
  2791.     0,    0,    0,    0,    0,  115,    0,  115,  115,    0,
  2792.     0,    0,  160,    0,  115,    0,    0,    0,    0,    0,
  2793.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2794.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2795.   213,  214,    0,    0,  217,    0,  219,    0,    0,  221,
  2796.   115,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2797.     0,    0,    0,    0,    0,    0,    0,    0,    0,  160,
  2798.     0,    0,    0,    0,    0,    0,    0,    0,  115,    0,
  2799.   115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
  2800.   115,  115,  115,  115,  115,    0,    0,    0,    0,  298,
  2801.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2802.     0,    0,    0,    0,    0,    0,  115,  115,    0,  115,
  2803.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2804.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2805.     0,    0,    0,    0,    0,    0,    0,    0,  115,    0,
  2806.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2807.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2808.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2809.     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  2810.     0,    0,    0,    0,    0,    0,    0,    0,  296,    0,
  2811.     0,  115,  115,
  2812. };
  2813. short yycheck[] = {                                      37,
  2814.    38,   58,   40,   41,   42,   43,   44,   45,   93,   47,
  2815.    41,   58,   58,   42,   42,   42,   38,   91,  170,   41,
  2816.    58,   59,   60,   61,   62,   63,   41,   58,   51,   52,
  2817.    60,  125,   62,   41,  124,   41,   58,   41,   60,  272,
  2818.    62,  104,   60,   58,   40,  371,   57,   59,   38,   45,
  2819.   202,   41,  272,   91,  380,   93,   94,   41,   44,   37,
  2820.    38,   42,   40,   41,   42,   43,   44,   45,   58,   47,
  2821.    40,  167,   94,   59,   44,   38,   38,  310,   41,   41,
  2822.    58,   59,   60,   61,   62,   63,  124,  125,   59,   59,
  2823.   310,   61,   43,  124,   45,   58,   58,  317,   60,  272,
  2824.    62,   40,  124,  255,   94,  292,   45,   91,  295,  124,
  2825.   173,  123,   59,   91,  125,   93,   94,  125,  124,   37,
  2826.    38,  125,   44,   41,   42,   43,   44,   45,  224,   47,
  2827.   126,   94,   94,  277,  124,   38,   38,   44,   41,   41,
  2828.    58,   59,   60,   59,   62,   63,  124,  125,   38,    2,
  2829.    61,   41,   59,  272,   61,   58,   58,   10,   40,   37,
  2830.    38,  124,  124,   41,   42,   43,   44,   45,   58,   47,
  2831.    60,   41,   62,   91,    9,   93,   94,  318,  278,  279,
  2832.    58,   59,   60,  273,   62,   63,   41,  126,  322,  323,
  2833.   324,   94,   94,  256,  212,   41,  337,  338,   33,   44,
  2834.   341,  342,  343,   58,   94,  317,  124,  125,  302,   44,
  2835.   304,   40,   58,   91,   41,   93,   94,   44,  320,  321,
  2836.    41,  124,  124,   44,   40,  314,  315,  316,  317,  252,
  2837.   274,   58,   59,   63,  124,  273,  274,   94,   59,   94,
  2838.   278,  279,   38,  272,  272,  319,  124,  125,   94,  329,
  2839.   329,  331,  331,  272,  292,  293,  294,  295,  296,  297,
  2840.   298,  299,   40,  293,  294,   60,   93,   62,   41,  124,
  2841.   292,  293,  294,  295,   43,   37,   45,  315,  124,  317,
  2842.    42,  319,  310,  310,  119,   47,  324,  283,  326,   44,
  2843.   328,  329,  330,  331,  332,  273,  274,  302,  125,  304,
  2844.   278,  279,  292,   37,   38,  295,   44,   41,   42,   43,
  2845.    44,   45,   40,   47,  292,  293,  294,  295,  296,  297,
  2846.   298,  299,  140,  141,   58,   59,   60,  125,   62,   63,
  2847.   292,  293,  294,  295,   44,  319,   93,  315,  277,  317,
  2848.   296,  319,  298,  339,  283,   44,  324,   58,  326,   41,
  2849.   328,  329,  330,  331,  332,  273,  274,   91,   44,   93,
  2850.    94,   41,   37,   38,  251,   41,   41,   42,   43,   44,
  2851.    45,   41,   47,   41,  292,  293,  294,  295,  312,  313,
  2852.   318,  319,  467,   58,   59,   60,   40,   62,   63,  292,
  2853.   124,  125,  295,  144,  145,  273,  274,   44,   44,   58,
  2854.   339,  319,  292,  293,  294,  295,   58,  294,   93,   40,
  2855.   467,  329,   40,  331,  292,  293,  294,  295,   93,   94,
  2856.   467,  467,   37,   59,   40,   59,   58,   42,  125,  467,
  2857.    59,  302,   47,   40,   59,  304,  467,   38,   41,   41,
  2858.    41,  319,   43,   44,   45,  467,  283,  283,   38,  124,
  2859.   125,  329,  467,  331,   94,  283,   43,   58,   59,   60,
  2860.    38,   62,   63,   41,  124,   43,   44,   45,  272,   44,
  2861.    59,   40,  277,   41,   41,  362,  302,  467,  311,  366,
  2862.    58,   59,   60,   41,   62,   63,  373,   59,   58,  467,
  2863.    41,   40,   93,   94,   41,   59,  383,  292,  293,  294,
  2864.   295,   41,   59,   41,  467,  467,   44,   38,  272,   59,
  2865.    41,   41,   43,   44,   45,   93,   94,   40,   44,  125,
  2866.    58,   59,   93,  124,  125,   63,   41,   58,   59,   60,
  2867.    93,   62,   63,   41,  329,   41,  331,   93,   59,  273,
  2868.   274,   59,   59,   41,   66,  269,  124,  125,   38,  467,
  2869.   309,   41,  310,    2,   44,   93,  149,  311,  292,  293,
  2870.   294,  295,   93,   94,  467,  467,  326,  171,   58,   59,
  2871.    60,  132,   62,   63,  134,  151,  135,  467,   33,   59,
  2872.    92,   61,   62,  240,  330,  319,   -1,  125,   68,  467,
  2873.    -1,   -1,   -1,  124,  125,  329,   -1,  331,  273,  274,
  2874.    -1,   -1,   38,   93,   94,   41,   -1,   -1,   44,   -1,
  2875.    -1,   -1,  467,   -1,   -1,   -1,   -1,  292,  293,  294,
  2876.   295,  467,   58,   59,   60,   38,   62,   63,   41,   -1,
  2877.    -1,   44,   -1,   -1,  124,  125,  136,  137,  138,  139,
  2878.   467,   -1,  142,  143,   -1,   58,   59,   60,   -1,   62,
  2879.    63,   -1,   -1,   -1,  329,   -1,  331,   93,   94,   -1,
  2880.    -1,   41,   -1,   -1,   44,  272,  146,  147,  148,   -1,
  2881.   277,   -1,  273,  274,   -1,   -1,  283,   -1,   58,   59,
  2882.    93,   94,   -1,   63,   -1,   -1,   -1,   -1,  124,  125,
  2883.    -1,  292,  293,  294,  295,  273,  274,   -1,   -1,   38,
  2884.   307,  308,   41,  310,   43,   -1,   45,   -1,   -1,   -1,
  2885.   317,  124,  125,   93,  292,  293,  294,  295,   -1,   58,
  2886.    -1,   60,   -1,   62,   38,   -1,  333,   41,  329,   43,
  2887.   331,   45,   38,  467,   -1,   41,  274,   43,   -1,   45,
  2888.    -1,   -1,  273,  274,   58,  125,   60,   -1,   62,   -1,
  2889.    -1,  329,   58,  331,   60,   94,   62,   38,   -1,   -1,
  2890.    41,  292,  293,  294,  295,   -1,   38,   -1,   -1,   41,
  2891.    -1,   -1,   44,   -1,   -1,   -1,   -1,   58,   -1,   60,
  2892.    94,   62,   -1,  273,  274,  124,   58,   59,   94,   -1,
  2893.    -1,   63,  467,   -1,   -1,   -1,   -1,   -1,  329,   -1,
  2894.   331,   -1,  292,  293,  294,  295,   38,   -1,   -1,   41,
  2895.   124,   38,   -1,   94,   41,   -1,   38,   -1,  124,   41,
  2896.    -1,   93,   94,   -1,   -1,   -1,   58,   -1,   60,   -1,
  2897.    62,   58,   -1,   60,   -1,   62,   58,  273,  274,  329,
  2898.    -1,  331,   -1,  124,   38,   -1,   -1,   41,   -1,   -1,
  2899.    44,   -1,  124,  125,   -1,   -1,  292,  293,  294,  295,
  2900.   273,  274,   94,   -1,   58,   59,  467,   94,   -1,   63,
  2901.    -1,   -1,   94,   -1,   -1,   -1,   -1,   -1,   -1,  292,
  2902.   293,  294,  295,   -1,   38,   -1,   -1,   41,   -1,  467,
  2903.    44,   -1,  124,  329,   -1,  331,   -1,  124,   -1,   93,
  2904.    94,   -1,  124,   -1,   58,   59,   -1,   38,   -1,   63,
  2905.    41,   -1,   -1,   44,   -1,   -1,  329,   -1,  331,   -1,
  2906.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   58,   59,  467,
  2907.   124,  125,   63,   -1,   -1,   -1,  467,   -1,   -1,   93,
  2908.    94,   -1,   -1,   -1,   38,   -1,   -1,   41,   -1,   -1,
  2909.    -1,   -1,   -1,  292,  293,  294,  295,   -1,   -1,   -1,
  2910.    -1,   -1,   93,   94,   58,   -1,   60,   -1,   62,   -1,
  2911.   124,  125,   -1,  275,   -1,   -1,   -1,  467,  292,  293,
  2912.   294,  295,   -1,  285,   -1,   -1,  292,  293,  294,  295,
  2913.   329,   -1,  331,  124,  125,   -1,   38,   -1,   -1,   41,
  2914.    94,  273,  274,   -1,   -1,   -1,   -1,  309,   -1,   -1,
  2915.    -1,  292,  293,  294,  295,  329,   58,  331,   60,   -1,
  2916.    62,   38,   -1,  329,   41,  331,   -1,   44,   -1,   -1,
  2917.   124,  467,  334,  335,  336,   -1,   -1,   -1,  340,   -1,
  2918.    -1,   58,   59,   -1,   -1,   -1,   63,   -1,  329,   -1,
  2919.   331,   -1,   94,   -1,  467,   -1,   -1,   -1,   -1,   -1,
  2920.   292,  293,  294,  295,   -1,  292,  293,  294,  295,   38,
  2921.   292,   -1,   41,  295,   -1,   44,   93,   94,   -1,  273,
  2922.   274,   -1,  124,   -1,   -1,   38,   -1,  467,   41,   58,
  2923.    59,   44,   -1,   -1,   63,   40,   -1,  329,   -1,  331,
  2924.    45,   -1,  329,   -1,  331,   58,   59,  124,  125,   -1,
  2925.    63,   -1,   -1,   -1,   59,   -1,   -1,   -1,   -1,  273,
  2926.   274,   -1,   -1,   -1,   93,   94,   -1,   -1,  467,   -1,
  2927.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   40,
  2928.    93,   94,  273,  274,   45,   -1,   -1,   -1,   -1,   -1,
  2929.    -1,   -1,   -1,  467,   -1,  124,  125,   -1,   59,   -1,
  2930.    -1,  467,   -1,   -1,   -1,   41,   -1,   -1,   44,   -1,
  2931.    -1,  124,  125,   -1,   -1,   -1,   -1,   -1,  123,   -1,
  2932.    -1,  126,   58,   59,   -1,   41,  467,   63,   44,   -1,
  2933.    -1,   -1,   40,   -1,   -1,  467,   -1,   45,  292,  293,
  2934.   294,  295,   58,   59,   -1,   -1,   -1,   63,   -1,   -1,
  2935.    40,   59,   -1,   -1,   -1,   45,   -1,   93,   94,   -1,
  2936.    -1,   -1,  123,   -1,  125,  126,   -1,   -1,   -1,   59,
  2937.    -1,   -1,    0,   -1,   -1,  467,   -1,   93,   94,   -1,
  2938.   467,   -1,   -1,    0,   -1,  467,   -1,   -1,  124,  125,
  2939.   292,  293,  294,  295,   -1,   -1,  273,  274,   -1,   -1,
  2940.    -1,   -1,   41,   -1,   41,   44,   -1,   44,  124,  125,
  2941.    -1,   -1,   -1,  467,   42,  123,   -1,   -1,  126,   58,
  2942.    59,   58,   59,   -1,   63,   42,   63,   -1,   -1,   -1,
  2943.    -1,   -1,   -1,  123,   -1,   -1,  126,   -1,   -1,   -1,
  2944.    -1,   -1,   -1,   -1,  273,  274,   -1,   -1,   -1,   -1,
  2945.    -1,  256,   -1,  467,   93,   -1,   93,   -1,   -1,   -1,
  2946.   273,  274,   -1,   -1,   -1,   -1,  271,  272,   -1,   -1,
  2947.   275,  276,  277,  278,  279,   -1,  467,   -1,  283,   -1,
  2948.   285,   -1,   -1,   -1,   -1,  124,  125,  124,  125,   -1,
  2949.    -1,   -1,   -1,   -1,   -1,  256,   -1,   -1,  303,   -1,
  2950.   305,  306,  307,  308,  309,  310,   -1,   -1,  313,   -1,
  2951.   271,  272,  317,  467,   -1,  276,  277,  278,  279,   -1,
  2952.    -1,   -1,  283,   -1,   -1,   -1,   -1,   -1,  333,  334,
  2953.   335,  336,   -1,   -1,  339,  340,   -1,  273,  274,   -1,
  2954.    -1,  302,  303,  304,  305,  306,  307,  308,  256,  310,
  2955.    -1,   -1,  313,   -1,   -1,   40,  317,  273,  274,   -1,
  2956.    45,   -1,   -1,  271,  272,  467,  256,   42,  276,  277,
  2957.   278,  279,  333,   -1,   60,  283,   42,   -1,  339,   -1,
  2958.    -1,  271,  272,   -1,   -1,   -1,  276,  277,  278,  279,
  2959.   467,   -1,   -1,  283,   -1,  303,   -1,  305,  306,  307,
  2960.   308,   -1,  310,   -1,   -1,  313,   -1,   -1,   -1,  317,
  2961.    -1,   -1,   -1,  303,   -1,  305,  306,  307,  308,  105,
  2962.   310,   -1,   -1,  313,   -1,  333,   -1,  317,   -1,   -1,
  2963.    -1,  339,   -1,   -1,  273,  274,  273,  274,  467,   -1,
  2964.    -1,  126,   -1,  333,  272,   -1,   -1,  275,   -1,  339,
  2965.    -1,   -1,   -1,   -1,  467,  272,   -1,  285,  275,   -1,
  2966.   465,  466,   41,   42,  150,   -1,   -1,   -1,  285,   -1,
  2967.    40,  157,   -1,   -1,   -1,   45,   -1,   -1,   -1,   -1,
  2968.    -1,  309,   40,   -1,   -1,   -1,   -1,   45,  316,   -1,
  2969.   318,   -1,  309,   -1,   -1,   -1,   -1,   -1,   -1,  316,
  2970.    -1,   -1,   -1,   -1,  465,  466,  334,  335,  336,  337,
  2971.   338,   -1,  340,  341,  342,  343,   -1,  334,  335,  336,
  2972.   275,   91,   -1,  340,  210,   -1,   -1,   -1,   -1,   -1,
  2973.   285,  467,   -1,   91,   -1,   40,   -1,   -1,   -1,   -1,
  2974.    45,   -1,  228,   -1,   -1,   -1,   -1,   40,   -1,   -1,
  2975.    -1,  467,   45,  123,  309,   -1,  126,  465,  466,   -1,
  2976.    59,  316,   61,   -1,   -1,  123,   -1,   -1,  126,   -1,
  2977.    -1,  256,   -1,   -1,  260,  465,  466,   -1,  264,  334,
  2978.   335,  336,   -1,   -1,   -1,  340,   -1,  272,   -1,   -1,
  2979.    -1,   -1,  277,  278,  279,   -1,   -1,  272,  283,   -1,
  2980.   275,   61,   -1,   -1,   -1,   -1,  272,   -1,   -1,  275,
  2981.   285,   -1,   -1,   61,   -1,   -1,   -1,  303,   -1,  285,
  2982.    -1,  126,  307,  308,   -1,  310,   -1,   -1,  467,   -1,
  2983.   467,   -1,  317,  126,  309,  310,   -1,   -1,   -1,   -1,
  2984.    -1,  316,   -1,  309,  310,  331,   -1,   -1,  333,   -1,
  2985.    -1,   -1,   -1,   -1,  339,   -1,   -1,   -1,   -1,  334,
  2986.   335,  336,   -1,   -1,   -1,  340,   -1,   -1,  334,  335,
  2987.   336,   -1,   -1,   -1,  340,   -1,   -1,   -1,   -1,   -1,
  2988.    -1,   -1,   -1,  369,   -1,  371,  256,   -1,   -1,   -1,
  2989.    -1,   -1,   -1,  272,  380,   -1,  275,   -1,  256,   -1,
  2990.    -1,   -1,  272,   -1,   -1,  275,  285,  277,  278,  279,
  2991.    -1,   -1,   -1,  283,  272,  285,   -1,   -1,   -1,  277,
  2992.   278,  279,   -1,   -1,   -1,  283,   -1,   -1,   -1,   -1,
  2993.   309,  310,   -1,   -1,   -1,   -1,   -1,  307,  308,  309,
  2994.   310,   -1,   -1,   -1,   -1,   -1,   -1,  317,   -1,  307,
  2995.   308,   -1,  310,   -1,   -1,  334,  335,  336,   -1,  317,
  2996.    -1,  340,   -1,  333,  334,  335,  336,  272,   -1,  339,
  2997.   340,   -1,  277,  278,  279,  333,   41,   -1,  283,  272,
  2998.    -1,  339,   -1,   -1,  277,  278,  279,   -1,   -1,   -1,
  2999.   283,   -1,   -1,   -1,   -1,   -1,   -1,  296,  297,  298,
  3000.   299,   -1,  307,  308,   -1,  310,   -1,   -1,   -1,   -1,
  3001.    -1,   -1,  317,   -1,  307,  308,  315,  310,  278,  279,
  3002.    -1,   -1,   -1,   -1,  317,  324,   -1,  326,  333,  328,
  3003.    -1,  330,   -1,  332,  339,   -1,  296,  297,  298,  299,
  3004.   333,   -1,   -1,   -1,  109,  110,  339,   -1,  296,  297,
  3005.   298,  299,  117,  118,   -1,  315,   -1,   -1,   -1,   -1,
  3006.    -1,   -1,   -1,  128,  324,   -1,  326,  315,  328,   -1,
  3007.   330,   -1,  332,   -1,   -1,   -1,  324,   -1,  326,   -1,
  3008.   328,   -1,  330,   -1,  332,   -1,   -1,   51,   52,   -1,
  3009.    -1,   -1,   -1,   -1,   -1,   59,   -1,   61,   62,   -1,
  3010.    -1,   -1,  167,   -1,   68,   -1,   -1,   -1,   -1,   -1,
  3011.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3012.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3013.   195,  196,   -1,   -1,  199,   -1,  201,   -1,   -1,  204,
  3014.   104,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3015.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  224,
  3016.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  132,   -1,
  3017.   134,  135,  136,  137,  138,  139,  140,  141,  142,  143,
  3018.   144,  145,  146,  147,  148,   -1,   -1,   -1,   -1,  254,
  3019.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3020.    -1,   -1,   -1,   -1,   -1,   -1,  170,  171,   -1,  173,
  3021.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3022.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3023.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  202,   -1,
  3024.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3025.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3026.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3027.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  3028.    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  252,   -1,
  3029.    -1,  255,  256,
  3030. };
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046. int yydebug;
  3047. int yynerrs;
  3048. int yyerrflag;
  3049. int yychar;
  3050. short *yyssp;
  3051. YYSTYPE *yyvsp;
  3052. YYSTYPE yyval;
  3053. YYSTYPE yylval;
  3054.  
  3055. short yyss[600  ];
  3056. YYSTYPE yyvs[600  ];
  3057.  
  3058.  
  3059. void yyerror(str)
  3060. char *str;
  3061. {
  3062.     extern int num_parse_error;
  3063.  
  3064.     if (num_parse_error > 5)
  3065.     return;
  3066.     (void)fprintf(    (&_iob[2]) , "%s: %s line %d\n", current_file, str,
  3067.           current_line);
  3068.     fflush(    (&_iob[2]) );
  3069.     smart_log(current_file, current_line, str);
  3070.     if (num_parse_error == 0)
  3071.     save_error(str, current_file, current_line);
  3072.     num_parse_error++;
  3073. }
  3074.  
  3075. static int check_declared(str)
  3076.     char *str;
  3077. {
  3078.     struct variable *vp;
  3079.     int offset;
  3080.  
  3081.     char * interned;
  3082.     extern char* findstring (char*) ;
  3083.   
  3084.     if (interned = findstring(str))  
  3085.         for (offset=mem_block[    3 ].current_size-sizeof(struct variable);
  3086.          offset >= 0;
  3087.          offset -= sizeof (struct variable))
  3088.     {
  3089.         vp = (struct variable *)&mem_block[    3 ].block[offset];
  3090.         if (vp->flags &     0x8    )
  3091.             continue;
  3092.          
  3093.         if (vp->name == interned)
  3094.             return offset / sizeof (struct variable);
  3095.     }
  3096.     return -1;
  3097. }
  3098.  
  3099. static int verify_declared(str)
  3100.     char *str;
  3101. {
  3102.     int r;
  3103.  
  3104.     r = check_declared(str);
  3105.     if (r < 0) {
  3106.     char buff[100];
  3107.         (void)sprintf(buff, "Variable %s not declared !", str);
  3108.         yyerror(buff);
  3109.     return -1;
  3110.     }
  3111.     return r;
  3112. }
  3113.  
  3114. void free_all_local_names()
  3115. {
  3116.     int i;
  3117.  
  3118.     for (i=0; i<current_number_of_locals; i++) {
  3119.     xfree(local_names[i]);
  3120.     local_names[i] = 0;
  3121.     }
  3122.     current_number_of_locals = 0;
  3123.     current_break_stack_need = 0;
  3124.     max_break_stack_need = 0;
  3125. }
  3126.  
  3127. void add_local_name(str, type)
  3128.     char *str;
  3129.     int type;
  3130. {
  3131.     if (current_number_of_locals ==             (configs[23].u.cf_int) )
  3132.     yyerror("Too many local variables");
  3133.     else {
  3134.     type_of_locals[current_number_of_locals] = type;
  3135.     local_names[current_number_of_locals++] = str;
  3136.     }
  3137. }
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151. static int copy_functions(from, type)
  3152.     struct program *from;
  3153.     int type;
  3154. {
  3155.     int i, initializer = -1;
  3156.     unsigned short tmp_short;
  3157.  
  3158.     for (i=0; i < from->num_functions; i++) {
  3159.      
  3160.  
  3161.  
  3162.     struct function fun;
  3163.     int new_type, n;
  3164.  
  3165.     fun = from->functions[i];     
  3166.      
  3167.  
  3168.  
  3169.     if (strchr(fun.name, ':') || fun.type & 0x0800    )
  3170.         fun.flags |=     0x8    ;     
  3171.     if (fun.type & 0x0800    )
  3172.         fun.flags |=     0x1    ;
  3173.     fun.name = make_shared_string(fun.name);     
  3174.     fun.offset = mem_block[    5 ].current_size /
  3175.         sizeof (struct inherit) - 1;
  3176.     fun.function_index_offset = i;
  3177.     if ((n = defined_function(fun.name, 0)) >= 0) {
  3178.         struct function *funp;
  3179.  
  3180.         funp = &((struct function *)mem_block[    1 ].block)[n];
  3181.         if (((fun.type & 0x0200    ) &&
  3182.            !(funp->flags &     0x2    ) &&
  3183.            !(fun.type & 0x0800    )) ||
  3184.  
  3185.             (funp->type & 0x0200    ) &&
  3186.            !(fun.type & 0x0800    ) &&
  3187.            !(funp->flags &     0x2    ))
  3188.         {
  3189.         char *p = (char *)alloca(80 + strlen(fun.name));
  3190.         sprintf(p, "Illegal to redefine 'nomask' function \"%s\"",
  3191.             fun.name);
  3192.         yyerror(p);
  3193.         }
  3194.     }
  3195.     if (fun.type & 0x0200    ) {
  3196.         fun.flags |=     0x1    ;
  3197.     } else if (!(fun.flags &     0x8    )) {
  3198.         fun.flags |=     0x2    ;
  3199.     }
  3200.      
  3201.  
  3202.  
  3203.  
  3204.     new_type = type;
  3205.     if (fun.type &     0x2000  )
  3206.         new_type &= ~0x0800    ;
  3207.     fun.type |= new_type;
  3208.      
  3209.  
  3210.  
  3211.  
  3212.     if (heart_beat == -1 && fun.name[0] == 'h' &&
  3213.         strcmp(fun.name, "heart_beat") == 0)
  3214.     {
  3215.         heart_beat = mem_block[    1 ].current_size /
  3216.         sizeof (struct function);
  3217.     } else if (fun.name[0] == '_' && strcmp(fun.name, "__INIT") == 0) {
  3218.         initializer = i;
  3219.         fun.flags |=     0x1    ;
  3220.     }
  3221.     add_to_mem_block(    1 , (char *)&fun, sizeof fun);
  3222.      
  3223.  
  3224.  
  3225.  
  3226.     tmp_short =     65535 ;     
  3227.     if (from->type_start != 0 && from->type_start[i] !=     65535 )
  3228.     {
  3229.         int arg;
  3230.          
  3231.  
  3232.  
  3233.  
  3234.         tmp_short = mem_block[6 ].current_size /
  3235.         sizeof from->argument_types[0];
  3236.         for (arg = 0; arg < fun.num_arg; arg++) {
  3237.         add_to_mem_block(6 ,
  3238.                  &from->argument_types[from->type_start[i]],
  3239.                  sizeof (unsigned short));
  3240.         }
  3241.     }
  3242.      
  3243.  
  3244.  
  3245.  
  3246.     add_to_mem_block(7 , &tmp_short, sizeof tmp_short);
  3247.     }
  3248.     return initializer;
  3249. }
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256. static void copy_variables(from, type)
  3257.     struct program *from;
  3258.     int type;
  3259. {
  3260.     int i;
  3261.  
  3262.     for (i=0; i<from->num_variables; i++) {
  3263.     int new_type = type;
  3264.     int n = check_declared(from->variable_names[i].name);
  3265.  
  3266.     if (n != -1 && (((struct variable *)mem_block[    3 ].block + (n)) ->type & 0x0200    )) {
  3267.         char *p = (char *)alloca(80 +
  3268.                      strlen(from->variable_names[i].name));
  3269.         sprintf(p, "Illegal to redefine 'nomask' variable \"%s\"",
  3270.             ((struct variable *)mem_block[    3 ].block + (n)) ->name);
  3271.         yyerror(p);
  3272.     }
  3273.      
  3274.  
  3275.  
  3276.  
  3277.     if (from->variable_names[i].type &     0x2000  )
  3278.         new_type &= ~0x0800    ;
  3279.     define_variable(from->variable_names[i].name,
  3280.             from->variable_names[i].type | new_type,
  3281.             from->variable_names[i].type & 0x0800     ?
  3282.                     0x8     : 0);
  3283.     }
  3284. }
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291. void store_line_number_info()
  3292. {
  3293.     unsigned short offset = mem_block[    0 ].current_size;
  3294.  
  3295.     while(mem_block[    4 ].current_size / sizeof (short) <
  3296.       current_line)
  3297.     {
  3298.     add_to_mem_block(    4 , (char *)&offset, sizeof offset);
  3299.     }
  3300. }
  3301.  
  3302. static char *get_type_name(type)
  3303.     int type;
  3304. {
  3305.     static char buff[100];
  3306.     static char *type_name[] = { "unknown", "int", "string",
  3307.                      "void", "object", "mixed", "mapping" };
  3308.     int pointer = 0;
  3309.  
  3310.     buff[0] = 0;
  3311.     if (type &     0x0100    )
  3312.     strcat(buff, "static ");
  3313.     if (type & 0x0200    )
  3314.     strcat(buff, "nomask ");
  3315.     if (type & 0x0800    )
  3316.     strcat(buff, "private ");
  3317.     if (type & 0x1000 )
  3318.     strcat(buff, "protected ");
  3319.     if (type &     0x2000  )
  3320.     strcat(buff, "public ");
  3321.     if (type & 0x4000    )
  3322.     strcat(buff, "varargs ");
  3323.     type &=     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ;
  3324.     if (type & 0x0400    ) {
  3325.     pointer = 1;
  3326.     type &= ~0x0400    ;
  3327.     }
  3328.     if (type >= sizeof type_name / sizeof type_name[0])
  3329.     fatal("Bad type\n");
  3330.     strcat(buff, type_name[type]);
  3331.     strcat(buff," ");
  3332.     if (pointer)
  3333.     strcat(buff, "* ");
  3334.     return buff;
  3335. }
  3336.  
  3337. void type_error(str, type)
  3338.     char *str;
  3339.     int type;
  3340. {
  3341.     static char buff[100];
  3342.     char *p;
  3343.     p = get_type_name(type);
  3344.     if (strlen(str) + strlen(p) + 5 >= sizeof buff) {
  3345.     yyerror(str);
  3346.     } else {
  3347.     strcpy(buff, str);
  3348.     strcat(buff, ": \"");
  3349.     strcat(buff, p);
  3350.     strcat(buff, "\"");
  3351.     yyerror(buff);
  3352.     }
  3353. }
  3354.  
  3355.  
  3356.  
  3357.  
  3358. void compile_file() {
  3359.     int yyparse();
  3360.  
  3361.     prolog();
  3362.     yyparse();
  3363.     epilog();
  3364. }
  3365.  
  3366. static char *get_two_types(type1, type2)
  3367.     int type1, type2;
  3368. {
  3369.     static char buff[100];
  3370.  
  3371.     strcpy(buff, "( ");
  3372.     strcat(buff, get_type_name(type1));
  3373.     strcat(buff, "vs ");
  3374.     strcat(buff, get_type_name(type2));
  3375.     strcat(buff, ")");
  3376.     return buff;
  3377. }
  3378.  
  3379.  
  3380.  
  3381.  
  3382. void epilog() {
  3383.     int size, i;
  3384.     char *p;
  3385.     struct function *funp;
  3386.     static int current_id_number = 1;
  3387.  
  3388.  
  3389.     if (num_parse_error == 0 && type_of_arguments.current_size != 0)
  3390.     fatal("Failed to deallocate argument type stack\n");
  3391.  
  3392.      
  3393.  
  3394.  
  3395.  
  3396.     if (first_last_initializer_end != last_initializer_end) {
  3397.     define_new_function("__INIT", 0, 0, 0, 0, 0);
  3398.      
  3399.  
  3400.  
  3401.  
  3402.     mem_block[    0 ].block[last_initializer_end-1] =
  3403.         270  -     257 ;
  3404.     mem_block[    0 ].block[last_initializer_end-0] =
  3405.         276  -     257 ;
  3406.     }
  3407.  
  3408.      
  3409.  
  3410.  
  3411.  
  3412.     for (i = 0; i < mem_block[    1 ].current_size; i += sizeof *funp) {
  3413.     funp = (struct function *)(mem_block[    1 ].block + i);
  3414.     if (!(funp->flags &     0x2    ))
  3415.         continue;
  3416.     find_inherited(funp);
  3417.     }
  3418.     if (num_parse_error > 0) {
  3419.     prog = 0;
  3420.     for (i=0; i<       11 ; i++)
  3421.         xfree(mem_block[i].block);
  3422.     return;
  3423.     }
  3424.     size = (((sizeof (struct program)) + 3) & ~3) ;
  3425.     for (i=0; i<    8 ; i++)
  3426.     size += (((mem_block[i].current_size) + 3) & ~3) ;
  3427.     p = (char *)xalloc(size);
  3428.     prog = (struct program *)p;
  3429.     *prog = NULL_program;
  3430.     prog->total_size = size;
  3431.     prog->ref = 0;
  3432.     prog->heart_beat = heart_beat;
  3433.     prog->name = string_copy(current_file);
  3434.     prog->id_number = current_id_number++;
  3435.     total_prog_block_size += prog->total_size;
  3436.     total_num_prog_blocks += 1;
  3437.  
  3438.     p += (((sizeof (struct program)) + 3) & ~3) ;
  3439.     prog->program = p;
  3440.     if (mem_block[    0 ].current_size)
  3441.     memcpy(p, mem_block[    0 ].block,
  3442.            mem_block[    0 ].current_size);
  3443.     prog->program_size = mem_block[    0 ].current_size;
  3444.  
  3445.     p += (((mem_block[    0 ].current_size) + 3) & ~3) ;
  3446.     prog->line_numbers = (unsigned short *)p;
  3447.     if (mem_block[    4 ].current_size)
  3448.     memcpy(p, mem_block[    4 ].block,
  3449.            mem_block[    4 ].current_size);
  3450.  
  3451.     p += (((mem_block[    4 ].current_size) + 3) & ~3) ;
  3452.     prog->functions = (struct function *)p;
  3453.     prog->num_functions = mem_block[    1 ].current_size /
  3454.     sizeof (struct function);
  3455.     if (mem_block[    1 ].current_size)
  3456.     memcpy(p, mem_block[    1 ].block,
  3457.            mem_block[    1 ].current_size);
  3458.  
  3459.     p += (((mem_block[    1 ].current_size) + 3) & ~3) ;
  3460.     prog->strings = (char **)p;
  3461.     prog->num_strings = mem_block[    2 ].current_size /
  3462.     sizeof (char *);
  3463.     if (mem_block[    2 ].current_size)
  3464.     memcpy(p, mem_block[    2 ].block,
  3465.            mem_block[    2 ].current_size);
  3466.  
  3467.     p += (((mem_block[    2 ].current_size) + 3) & ~3) ;
  3468.     prog->variable_names = (struct variable *)p;
  3469.     prog->num_variables = mem_block[    3 ].current_size /
  3470.     sizeof (struct variable);
  3471.     if (mem_block[    3 ].current_size)
  3472.     memcpy(p, mem_block[    3 ].block,
  3473.            mem_block[    3 ].current_size);
  3474.  
  3475.     p += (((mem_block[    3 ].current_size) + 3) & ~3) ;
  3476.     prog->num_inherited = mem_block[    5 ].current_size /
  3477.     sizeof (struct inherit);
  3478.     if (prog->num_inherited) {
  3479.     memcpy(p, mem_block[    5 ].block,
  3480.            mem_block[    5 ].current_size);
  3481.     prog->inherit = (struct inherit *)p;
  3482.     } else
  3483.     prog->inherit = 0;
  3484.     
  3485.     prog->argument_types = 0;     
  3486.  
  3487.     prog->type_start = 0;
  3488.     for (i=0; i<       11 ; i++)
  3489.         xfree((char *)mem_block[i].block);
  3490.  
  3491.      
  3492.  
  3493.  
  3494.  
  3495.  
  3496.     reference_prog (prog, "epilog");
  3497.     for (i = 0; i < prog->num_inherited; i++) {
  3498.     reference_prog (prog->inherit[i].prog, "inheritance");
  3499.     }
  3500. }
  3501.  
  3502.  
  3503.  
  3504.  
  3505. static void prolog() {
  3506.     int i;
  3507.  
  3508.     if (type_of_arguments.block == 0) {
  3509.     type_of_arguments.max_size = 100;
  3510.     type_of_arguments.block = xalloc(type_of_arguments.max_size);
  3511.     }
  3512.     type_of_arguments.current_size = 0;
  3513.     approved_object = 0;
  3514.     last_push_indexed = -1;
  3515.     last_push_local = -1;
  3516.     last_push_identifier = -1;
  3517.     prog = 0;         
  3518.     heart_beat = -1;
  3519.     comp_stackp = 0;     
  3520.     current_continue_address = 0;
  3521.     current_break_address = 0;
  3522.     num_parse_error = 0;
  3523.     free_all_local_names();     
  3524.      
  3525.  
  3526.  
  3527.     for (i=0; i <        11 ; i++) {
  3528.     mem_block[i].block = xalloc(4096 );
  3529.     mem_block[i].current_size = 0;
  3530.     mem_block[i].max_size = 4096 ;
  3531.     }
  3532.     add_new_init_jump();
  3533.     first_last_initializer_end = last_initializer_end;
  3534. }
  3535.  
  3536.  
  3537.  
  3538.  
  3539. void add_new_init_jump() {
  3540.      
  3541.  
  3542.  
  3543.     ins_f_byte(257 );
  3544.     last_initializer_end = mem_block[    0 ].current_size;
  3545.     ins_short(0);
  3546. }
  3547.  
  3548.  
  3549.  
  3550.  
  3551. int
  3552. yyparse()
  3553. {
  3554.     register int yym, yyn, yystate;
  3555.  
  3556.  
  3557.     yynerrs = 0;
  3558.     yyerrflag = 0;
  3559.     yychar = (-1);
  3560.  
  3561.     yyssp = yyss;
  3562.     yyvsp = yyvs;
  3563.     *yyssp = yystate = 0;
  3564.  
  3565. yyloop:
  3566.     if (yyn = yydefred[yystate]) goto yyreduce;
  3567.     if (yychar < 0)
  3568.     {
  3569.         if ((yychar = yylex()) < 0) yychar = 0;
  3570.  
  3571.     }
  3572.     if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
  3573.             yyn <= 2153  && yycheck[yyn] == yychar)
  3574.     {
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.         if (yyssp >= yyss + 600    - 1)
  3581.         {
  3582.             goto yyoverflow;
  3583.         }
  3584.         *++yyssp = yystate = yytable[yyn];
  3585.         *++yyvsp = yylval;
  3586.         yychar = (-1);
  3587.         if (yyerrflag > 0)  --yyerrflag;
  3588.         goto yyloop;
  3589.     }
  3590.     if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
  3591.             yyn <= 2153  && yycheck[yyn] == yychar)
  3592.     {
  3593.         yyn = yytable[yyn];
  3594.         goto yyreduce;
  3595.     }
  3596.     if (yyerrflag) goto yyinrecovery;
  3597.  
  3598.  
  3599.  
  3600. yynewerror:
  3601.     yyerror("syntax error");
  3602.  
  3603.  
  3604.  
  3605. yyerrlab:
  3606.     ++yynerrs;
  3607. yyinrecovery:
  3608.     if (yyerrflag < 3)
  3609.     {
  3610.         yyerrflag = 3;
  3611.         for (;;)
  3612.         {
  3613.             if ((yyn = yysindex[*yyssp]) && (yyn += 256 ) >= 0 &&
  3614.                     yyn <= 2153  && yycheck[yyn] == 256 )
  3615.             {
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.                 if (yyssp >= yyss + 600    - 1)
  3622.                 {
  3623.                     goto yyoverflow;
  3624.                 }
  3625.                 *++yyssp = yystate = yytable[yyn];
  3626.                 *++yyvsp = yylval;
  3627.                 goto yyloop;
  3628.             }
  3629.             else
  3630.             {
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.                 if (yyssp <= yyss) goto yyabort;
  3637.                 --yyssp;
  3638.                 --yyvsp;
  3639.             }
  3640.         }
  3641.     }
  3642.     else
  3643.     {
  3644.         if (yychar == 0) goto yyabort;
  3645.  
  3646.         yychar = (-1);
  3647.         goto yyloop;
  3648.     }
  3649. yyreduce:
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.     yym = yylen[yyn];
  3656.     yyval = yyvsp[1-yym];
  3657.     switch (yyn)
  3658.     {
  3659. case 5:
  3660.  
  3661. { yyerror("Extra ';'. Ignored."); }
  3662. break;
  3663. case 6:
  3664.  
  3665. {
  3666.             struct object *ob;
  3667.             struct inherit inherit;
  3668.             int initializer;
  3669.  
  3670.             ob = find_object2(yyvsp[-1].string );
  3671.             if (ob == 0) {
  3672.             inherit_file = yyvsp[-1].string ;
  3673.              
  3674.             goto yyaccept ;
  3675.             }
  3676.             xfree(yyvsp[-1].string );
  3677.             if (ob->flags &     0x80  )
  3678.             approved_object = 1;
  3679.             inherit.prog = ob->prog;
  3680.             inherit.function_index_offset =
  3681.             mem_block[    1 ].current_size /
  3682.                 sizeof (struct function);
  3683.             inherit.variable_index_offset =
  3684.             mem_block[    3 ].current_size /
  3685.                 sizeof (struct variable);
  3686.             inherit.type = yyvsp[-3].number ;
  3687.             add_to_mem_block(    5 , &inherit, sizeof inherit);
  3688.             copy_variables(ob->prog, yyvsp[-3].number );
  3689.             initializer = copy_functions(ob->prog, yyvsp[-3].number );
  3690.             if (initializer > 0) {
  3691.             struct function *funp;
  3692.             int f;
  3693.             f = define_new_function("::__INIT", 0, 0, 0, 0, 0);
  3694.             funp = ((struct function *)mem_block[    1 ].block + (f)) ;
  3695.             funp->offset = mem_block[    5 ].current_size /
  3696.                 sizeof (struct inherit) - 1;
  3697.             funp->flags = 0x4     |
  3698.                     0x1     |     0x8    ;
  3699.             funp->type = 3 ;
  3700.             funp->function_index_offset = initializer;
  3701.             transfer_init_control();
  3702.             ins_f_byte(263 );
  3703.             ins_short(f);
  3704.             ins_byte(0);     
  3705.             ins_f_byte(260 );
  3706.             add_new_init_jump();
  3707.             }
  3708.         }
  3709. break;
  3710. case 7:
  3711.  
  3712. {
  3713.         if ( yyvsp[0].number  == 0 ) {
  3714.         ins_f_byte(269 ); yyval.type  = 5    ;
  3715.         } else if ( yyvsp[0].number  == 1 ) {
  3716.         ins_f_byte(270 ); yyval.type  = 1 ;
  3717.         } else {
  3718.         ins_f_byte(283 ); ins_long(yyvsp[0].number ); yyval.type  = 1 ;
  3719.         }
  3720.     }
  3721. break;
  3722. case 8:
  3723.  
  3724. { yyval.number  = 0; }
  3725. break;
  3726. case 9:
  3727.  
  3728. { yyval.number  = 0x0400    ; }
  3729. break;
  3730. case 10:
  3731.  
  3732. { yyval.number  = 0; }
  3733. break;
  3734. case 11:
  3735.  
  3736. { yyval.number  = ';'; }
  3737. break;
  3738. case 12:
  3739.  
  3740. {
  3741.          
  3742.         push_explicit(mem_block[    0 ].current_size);
  3743.  
  3744.         if (yyvsp[-2].number  &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) {
  3745.         exact_types = yyvsp[-2].number  | yyvsp[-1].number ;
  3746.         } else {
  3747.         if (pragma_strict_types)
  3748.             yyerror("\"#pragma strict_types\" requires type of function");
  3749.         exact_types = 0;
  3750.         }
  3751.     }
  3752. break;
  3753. case 13:
  3754.  
  3755. {
  3756.          
  3757.  
  3758.  
  3759.  
  3760.         define_new_function(yyvsp[-4].string , yyvsp[-1].number , 0, 0,
  3761.                     0x2    |    0x10    , yyvsp[-6].number  | yyvsp[-5].number );
  3762.     }
  3763. break;
  3764. case 14:
  3765.  
  3766. {
  3767.          
  3768.         if (yyvsp[0].number  == ';') {
  3769.         (void)pop_address();  
  3770.         } else {
  3771.         define_new_function(yyvsp[-6].string , yyvsp[-3].number , current_number_of_locals - yyvsp[-3].number +
  3772.             ( max_break_stack_need -1 ) / sizeof(struct svalue) +1,
  3773.             pop_address(), 0, yyvsp[-8].number  | yyvsp[-7].number );
  3774.         ins_f_byte(269 ); ins_f_byte(276 );
  3775.         }
  3776.         free_all_local_names();
  3777.         xfree(yyvsp[-6].string );         
  3778.     }
  3779. break;
  3780. case 15:
  3781.  
  3782. { if (yyvsp[-2].number  == 0) yyerror("Missing type"); }
  3783. break;
  3784. case 17:
  3785.  
  3786. {
  3787.         if (exact_types && yyvsp[-2].number  == 0) {
  3788.         yyerror("Missing type for argument");
  3789.         add_local_name(yyvsp[0].string , 5    );     
  3790.         } else {
  3791.         add_local_name(yyvsp[0].string , yyvsp[-2].number  | yyvsp[-1].number );
  3792.         }
  3793.     }
  3794. break;
  3795. case 18:
  3796.  
  3797. {yyerror("Illegal to redeclare local name"); }
  3798. break;
  3799. case 19:
  3800.  
  3801. { yyval.number  = 0; }
  3802. break;
  3803. case 21:
  3804.  
  3805. { yyval.number  = 1; }
  3806. break;
  3807. case 22:
  3808.  
  3809. { yyval.number  = yyvsp[-2].number  + 1; }
  3810. break;
  3811. case 23:
  3812.  
  3813. { yyval.number  = 0x0200    ; }
  3814. break;
  3815. case 24:
  3816.  
  3817. { yyval.number  =     0x0100    ; }
  3818. break;
  3819. case 25:
  3820.  
  3821. { yyval.number  = 0x0800    ; }
  3822. break;
  3823. case 26:
  3824.  
  3825. { yyval.number  =     0x2000  ; }
  3826. break;
  3827. case 27:
  3828.  
  3829. { yyval.number  = 0x4000    ; }
  3830. break;
  3831. case 28:
  3832.  
  3833. { yyval.number  = 0x1000 ; }
  3834. break;
  3835. case 29:
  3836.  
  3837. { yyval.number  = 0; }
  3838. break;
  3839. case 30:
  3840.  
  3841. { yyval.number  = yyvsp[-1].number  | yyvsp[0].number ; }
  3842. break;
  3843. case 31:
  3844.  
  3845. { yyval.number  = yyvsp[-1].number  | yyvsp[0].number ; current_type = yyval.number ; }
  3846. break;
  3847. case 32:
  3848.  
  3849. {
  3850.         yyval.type  = yyvsp[-2].number  | yyvsp[-1].number ;
  3851.     }
  3852. break;
  3853. case 34:
  3854.  
  3855. { yyval.number  = 0    ; }
  3856. break;
  3857. case 35:
  3858.  
  3859. { yyval.number  = 1 ; current_type = yyval.number ; }
  3860. break;
  3861. case 36:
  3862.  
  3863. { yyval.number  = 1 ; current_type = yyval.number ; }
  3864. break;
  3865. case 37:
  3866.  
  3867. { yyval.number  = 2 ; current_type = yyval.number ; }
  3868. break;
  3869. case 38:
  3870.  
  3871. { yyval.number  = 4 ; current_type = yyval.number ; }
  3872. break;
  3873. case 39:
  3874.  
  3875. {yyval.number  = 3 ; current_type = yyval.number ; }
  3876. break;
  3877. case 40:
  3878.  
  3879. { yyval.number  = 5    ; current_type = yyval.number ; }
  3880. break;
  3881. case 41:
  3882.  
  3883. { yyval.number  = 6 ; current_type = yyval.number ; }
  3884. break;
  3885. case 44:
  3886.  
  3887. {
  3888.         define_variable(yyvsp[0].string , current_type | yyvsp[-1].number , 0);
  3889.         xfree(yyvsp[0].string );
  3890.     }
  3891. break;
  3892. case 45:
  3893.  
  3894. {
  3895.         int var_num;
  3896.         define_variable(yyvsp[0].string , current_type | yyvsp[-1].number , 0);
  3897.         var_num = verify_declared(yyvsp[0].string );
  3898.         transfer_init_control();
  3899.         ins_f_byte(264 );
  3900.         ins_byte(var_num);
  3901.     }
  3902. break;
  3903. case 46:
  3904.  
  3905. {
  3906.         if (!compatible_types((current_type | yyvsp[-4].number ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) , yyvsp[0].type )){
  3907.         char buff[100];
  3908.         sprintf(buff, "Type mismatch %s when initializing %s",
  3909.             get_two_types(current_type | yyvsp[-4].number , yyvsp[0].type ), yyvsp[-3].string );
  3910.         yyerror(buff);
  3911.         }
  3912.         ins_f_byte(284 );
  3913.         ins_f_byte(260 );
  3914.         add_new_init_jump();
  3915.         xfree(yyvsp[-3].string );
  3916.     }
  3917. break;
  3918. case 47:
  3919.  
  3920. { ; }
  3921. break;
  3922. case 50:
  3923.  
  3924. {
  3925.         add_local_name(yyvsp[0].string , current_type | yyvsp[-1].number );
  3926.     }
  3927. break;
  3928. case 56:
  3929.  
  3930. {
  3931.         ins_f_byte(260 );
  3932.         if (d_flag)
  3933.         ins_f_byte(350 );
  3934.          
  3935.  
  3936.     }
  3937. break;
  3938. case 67:
  3939.  
  3940. {
  3941.             if (current_break_address == 0)
  3942.             yyerror("break statement outside loop");
  3943.             if (current_break_address &     0x40000 ) {
  3944.             ins_f_byte(303 );
  3945.             } else {
  3946.                 ins_f_byte(257 ); ins_short(current_break_address);
  3947.             }
  3948.         }
  3949. break;
  3950. case 68:
  3951.  
  3952. {
  3953.             if (current_continue_address == 0)
  3954.             yyerror("continue statement outside loop");
  3955.             ins_f_byte(257 ); ins_short(current_continue_address);
  3956.         }
  3957. break;
  3958. case 69:
  3959.  
  3960. {   push_explicit(current_continue_address);
  3961.         push_explicit(current_break_address);
  3962.         current_continue_address = mem_block[    0 ].current_size;
  3963.     }
  3964. break;
  3965. case 70:
  3966.  
  3967. {
  3968.         ins_f_byte(259 ); ins_short(0);     
  3969.         current_break_address = mem_block[    0 ].current_size;
  3970.         ins_f_byte(257 ); ins_short(0);     
  3971.         upd_short(current_break_address-2,
  3972.               mem_block[    0 ].current_size);
  3973.     }
  3974. break;
  3975. case 71:
  3976.  
  3977. {
  3978.       ins_f_byte(257 ); ins_short(current_continue_address);
  3979.       upd_short(current_break_address+1,
  3980.             mem_block[    0 ].current_size);
  3981.       current_break_address = pop_address();
  3982.       current_continue_address = pop_address();
  3983.         }
  3984. break;
  3985. case 72:
  3986.  
  3987. {
  3988.         int tmp_save;
  3989.         push_explicit(current_continue_address);
  3990.     push_explicit(current_break_address);
  3991.      
  3992.     ins_f_byte(257 ); tmp_save = mem_block[    0 ].current_size;
  3993.     ins_short(0);
  3994.     current_break_address = mem_block[    0 ].current_size;
  3995.      
  3996.     ins_f_byte(257 ); push_address(); ins_short(0);
  3997.     current_continue_address = mem_block[    0 ].current_size;
  3998.     upd_short(tmp_save, current_continue_address);
  3999.         push_address();
  4000.     
  4001.     }
  4002. break;
  4003. case 73:
  4004.  
  4005. {
  4006.     ins_f_byte(259 ); ins_short(pop_address());
  4007.      
  4008.     upd_short(pop_address(), mem_block[    0 ].current_size);
  4009.     current_break_address = pop_address();
  4010.     current_continue_address = pop_address();
  4011.     }
  4012. break;
  4013. case 74:
  4014.  
  4015. { push_explicit(current_continue_address);
  4016.             push_explicit(current_break_address); }
  4017. break;
  4018. case 75:
  4019.  
  4020. {   ins_f_byte(260 );
  4021.               push_address();
  4022.           }
  4023. break;
  4024. case 76:
  4025.  
  4026. {
  4027.             ins_f_byte(259 );
  4028.             ins_short(0);     
  4029.             current_break_address = mem_block[    0 ].current_size;
  4030.             ins_f_byte(257 ); ins_short(0);     
  4031.              current_continue_address =
  4032.             mem_block[    0 ].current_size;
  4033.           }
  4034. break;
  4035. case 77:
  4036.  
  4037. {
  4038.              ins_f_byte(260 );
  4039.             ins_f_byte(257 ); ins_short(pop_address());
  4040.              
  4041.             upd_short(current_break_address-2,
  4042.                   mem_block[    0 ].current_size);
  4043.           }
  4044. break;
  4045. case 78:
  4046.  
  4047. {
  4048.        ins_f_byte(257 ); ins_short(current_continue_address);
  4049.         
  4050.        upd_short(current_break_address+1, mem_block[    0 ].current_size);
  4051.        current_break_address = pop_address();
  4052.        current_continue_address = pop_address();
  4053.    }
  4054. break;
  4055. case 79:
  4056.  
  4057. { ins_f_byte(270 ); }
  4058. break;
  4059. case 81:
  4060.  
  4061. {
  4062.         current_break_stack_need += sizeof(short);
  4063.         if ( current_break_stack_need > max_break_stack_need )
  4064.             max_break_stack_need = current_break_stack_need;
  4065.     push_explicit(current_case_number_heap);
  4066.     push_explicit(current_case_string_heap);
  4067.     push_explicit(zero_case_label);
  4068.     push_explicit(current_break_address);
  4069.     ins_f_byte(306 );
  4070.     ins_byte(0xff);  
  4071.     current_case_number_heap = mem_block[    8 ].current_size;
  4072.     current_case_string_heap = mem_block[    9 ].current_size;
  4073.     zero_case_label =    0x80000 ;
  4074.     ins_short(0);  
  4075.     current_break_address = mem_block[    0 ].current_size |
  4076.                     0x40000  |     0x80000  ;
  4077.     ins_short(0);  
  4078.     ins_short(0);  
  4079.     }
  4080. break;
  4081. case 82:
  4082.  
  4083. {
  4084.     char *heap_start;
  4085.     int heap_end_offs;
  4086.     int i,o;
  4087.     int current_key,last_key;
  4088.      
  4089.     int block_index;
  4090.     int current_case_heap;
  4091.     int lookup_start;
  4092.     int lookup_start_key;
  4093.  
  4094.     current_break_address &= ~(    0x40000 |    0x80000 );
  4095.  
  4096.     if ( !read_short(current_break_address+2 ) )
  4097.         upd_short(current_break_address+2,      
  4098.           mem_block[    0 ].current_size);   
  4099.  
  4100.      
  4101.     ins_f_byte(303 );
  4102.     if(zero_case_label & (   0x80000 |0x40000 )){
  4103.         block_index =     8 ;
  4104.         current_case_heap = current_case_number_heap;
  4105.     } else {
  4106.         block_index =     9 ;
  4107.         current_case_heap = current_case_string_heap;
  4108.         if (zero_case_label&0xffff) {
  4109.         struct case_heap_entry temp;
  4110.  
  4111.         temp.key = (int) 0  ;
  4112.         temp.addr = zero_case_label;
  4113.         temp.line = 0;  
  4114.  
  4115.         add_to_case_heap(    9 ,&temp);
  4116.         }
  4117.     }
  4118.     heap_start = mem_block[block_index].block + current_case_heap ;
  4119.     heap_end_offs = mem_block[block_index].current_size -current_case_heap;
  4120.     if (!heap_end_offs) yyerror("switch without case not supported");
  4121.  
  4122.          
  4123.  
  4124.  
  4125.         add_to_mem_block(block_index, "\0\0\0\0\0\0\0\0",
  4126.             sizeof(struct case_heap_entry) );
  4127.  
  4128.          
  4129.      
  4130.  
  4131.  
  4132.     mem_block[       10 ].current_size = 0;
  4133.     lookup_start = 0;
  4134.     lookup_start_key = ((struct case_heap_entry*)heap_start)->key;
  4135.         for( ; ((struct case_heap_entry*)heap_start)->addr; )
  4136.         {
  4137.             int offset;
  4138.         int curr_line,last_line;
  4139.         unsigned short current_addr,last_addr = 0xffff;
  4140.         int range_start;
  4141.  
  4142.             current_key = ((struct case_heap_entry*)heap_start)->key ;
  4143.             curr_line = ((struct case_heap_entry*)heap_start)->line ;
  4144.             current_addr = ((struct case_heap_entry*)heap_start)->addr ;
  4145.             if ( current_key == last_key &&
  4146.               mem_block[       10 ].current_size )
  4147.             {
  4148.                 char buf[90];
  4149.  
  4150.                 sprintf(buf,"Duplicate case in line %d and %d",
  4151.             last_line, curr_line);
  4152.                 yyerror(buf);
  4153.             }
  4154.         if (curr_line) {
  4155.         if (last_addr == 1) {
  4156.                     char buf[120];
  4157.     
  4158.             sprintf(buf,
  4159. "Discontinued case label list range, line %d by line %d",
  4160.               last_line, curr_line);
  4161.                     yyerror(buf);
  4162.         }
  4163.           else if (current_key == last_key + 1
  4164.             && current_addr == last_addr) {
  4165.             if (mem_block[       10 ].current_size
  4166.               != range_start + 6) {
  4167.               *(short*)(mem_block[       10 ].block+range_start+4)
  4168.             =1;
  4169.               mem_block[       10 ].current_size = range_start + 6;
  4170.             }
  4171.         } else {
  4172.             range_start = mem_block[       10 ].current_size;
  4173.         }
  4174.         }
  4175.             last_key = current_key;
  4176.         last_line = curr_line;
  4177.         last_addr = current_addr;
  4178.         add_to_mem_block(       10 ,
  4179.                 (char *)¤t_key, sizeof(long) );
  4180.         add_to_mem_block(       10 ,
  4181.         (char *)¤t_addr, sizeof(short) );
  4182.             for ( offset = 0; ; )
  4183.             {
  4184.  
  4185.                 int child1,child2;
  4186.  
  4187.                 child1 = ( offset << 1 ) + sizeof(struct case_heap_entry);
  4188.                 child2 = child1 + sizeof(struct case_heap_entry);
  4189.                 if ( child1 >= heap_end_offs ) break;
  4190.                 if ( ((struct case_heap_entry*)(heap_start+child1))->addr &&
  4191.                   ( !((struct case_heap_entry*)(heap_start+child2))->addr ||
  4192.                    ((struct case_heap_entry*)(heap_start+child1))->key <=
  4193.                    ((struct case_heap_entry*)(heap_start+child2))->key  ) )
  4194.                 {
  4195.                     *(struct case_heap_entry*)(heap_start+offset) =
  4196.                     *(struct case_heap_entry*)(heap_start+child1);
  4197.                     offset = child1;
  4198.                 } else
  4199.                     if (((struct case_heap_entry*)(heap_start+child2))->addr ) {
  4200.                         *(struct case_heap_entry*)(heap_start+offset) =
  4201.                         *(struct case_heap_entry*)(heap_start+child2);
  4202.                         offset = child2;
  4203.                     } else break;
  4204.             }
  4205.             ((struct case_heap_entry*)(heap_start+offset))->addr = 0;
  4206.         }
  4207.  
  4208.      
  4209.         upd_short(current_break_address-2,
  4210.             mem_block[    0 ].current_size);
  4211.  
  4212.     add_to_mem_block(    0 , mem_block[       10 ].block,
  4213.             mem_block[       10 ].current_size );
  4214.          
  4215.         for(i=0xf0,o=6; o<<1 <= mem_block[       10 ].current_size; )
  4216.             i++,o<<=1;
  4217.         if (block_index ==     9 ) i = ( i << 4 ) | 0xf;
  4218.          
  4219.         mem_block[    0 ].block[current_break_address-3] &= i;
  4220.  
  4221.     upd_short(current_break_address, mem_block[    0 ].current_size);
  4222.     
  4223.     mem_block[    8 ].current_size = current_case_number_heap;
  4224.     mem_block[    9 ].current_size = current_case_string_heap;
  4225.         current_break_address = pop_address();
  4226.     zero_case_label = pop_address();
  4227.         current_case_string_heap = pop_address();
  4228.         current_case_number_heap = pop_address();
  4229.         current_break_stack_need -= sizeof(short);
  4230.     }
  4231. break;
  4232. case 83:
  4233.  
  4234. {
  4235.     struct case_heap_entry temp;
  4236.  
  4237.     if ( !( current_break_address &     0x80000  ) ) {
  4238.         yyerror("Case outside switch");
  4239.         break;
  4240.     }
  4241.     temp.key = yyvsp[-1].case_label .key;
  4242.     temp.addr = mem_block[    0 ].current_size;
  4243.     temp.line = current_line;
  4244.     add_to_case_heap(yyvsp[-1].case_label .block,&temp);
  4245.     }
  4246. break;
  4247. case 84:
  4248.  
  4249. {
  4250.     struct case_heap_entry temp;
  4251.  
  4252.     if ( yyvsp[-3].case_label .block !=     8  || yyvsp[-1].case_label .block !=     8  )
  4253.         yyerror("String case labels not allowed as range bounds");
  4254.     if (yyvsp[-3].case_label .key > yyvsp[-1].case_label .key) break;
  4255.     temp.key = yyvsp[-3].case_label .key;
  4256.     temp.addr = 1;
  4257.     temp.line = current_line;
  4258.     add_to_case_heap(    8 ,&temp);
  4259.     temp.key = yyvsp[-1].case_label .key;
  4260.     temp.addr = mem_block[    0 ].current_size;
  4261.     temp.line = 0;
  4262.     add_to_case_heap(    8 ,&temp);
  4263.     }
  4264. break;
  4265. case 85:
  4266.  
  4267. {
  4268.         if ( !(zero_case_label &    0x80000 ) )
  4269.         yyerror("Mixed case label list not allowed");
  4270.         if ( yyval.case_label .key = yyvsp[0].number  )
  4271.             zero_case_label |= 0x40000 ;
  4272.         else
  4273.         zero_case_label |= mem_block[    0 ].current_size;
  4274.         yyval.case_label .block =     8 ;
  4275.     }
  4276. break;
  4277. case 86:
  4278.  
  4279. {
  4280.         if ( zero_case_label & 0x40000  )
  4281.         yyerror("Mixed case label list not allowed");
  4282.         zero_case_label &= ~   0x80000 ;
  4283.             store_prog_string(yyvsp[0].string );
  4284.             yyval.case_label .key = (int)yyvsp[0].string ;
  4285.         yyval.case_label .block =     9 ;
  4286.         }
  4287. break;
  4288. case 88:
  4289.  
  4290. { yyval.number  = yyvsp[-2].number  | yyvsp[0].number ; }
  4291. break;
  4292. case 90:
  4293.  
  4294. { yyval.number  = yyvsp[-2].number  ^ yyvsp[0].number ; }
  4295. break;
  4296. case 92:
  4297.  
  4298. { yyval.number  = yyvsp[-2].number  & yyvsp[0].number ; }
  4299. break;
  4300. case 94:
  4301.  
  4302. { yyval.number  = yyvsp[-2].number  == yyvsp[0].number ; }
  4303. break;
  4304. case 95:
  4305.  
  4306. { yyval.number  = yyvsp[-2].number  != yyvsp[0].number ; }
  4307. break;
  4308. case 97:
  4309.  
  4310. { yyval.number  = yyvsp[-2].number  >  yyvsp[0].number ; }
  4311. break;
  4312. case 98:
  4313.  
  4314. { yyval.number  = yyvsp[-2].number  >= yyvsp[0].number ; }
  4315. break;
  4316. case 99:
  4317.  
  4318. { yyval.number  = yyvsp[-2].number  <  yyvsp[0].number ; }
  4319. break;
  4320. case 100:
  4321.  
  4322. { yyval.number  = yyvsp[-2].number  <= yyvsp[0].number ; }
  4323. break;
  4324. case 102:
  4325.  
  4326. { yyval.number  = yyvsp[-2].number  << yyvsp[0].number ; }
  4327. break;
  4328. case 103:
  4329.  
  4330. { yyval.number  = yyvsp[-2].number  >> yyvsp[0].number ; }
  4331. break;
  4332. case 105:
  4333.  
  4334. { yyval.number  = yyvsp[-2].number  + yyvsp[0].number ; }
  4335. break;
  4336. case 106:
  4337.  
  4338. { yyval.number  = yyvsp[-2].number  - yyvsp[0].number ; }
  4339. break;
  4340. case 108:
  4341.  
  4342. { yyval.number  = yyvsp[-2].number  * yyvsp[0].number ; }
  4343. break;
  4344. case 109:
  4345.  
  4346. { yyval.number  = yyvsp[-2].number  % yyvsp[0].number ; }
  4347. break;
  4348. case 110:
  4349.  
  4350. { yyval.number  = yyvsp[-2].number  / yyvsp[0].number ; }
  4351. break;
  4352. case 112:
  4353.  
  4354. { yyval.number  = yyvsp[-1].number ; }
  4355. break;
  4356. case 114:
  4357.  
  4358. { yyval.number  = -yyvsp[0].number ; }
  4359. break;
  4360. case 115:
  4361.  
  4362. { yyval.number  = !yyvsp[0].number ; }
  4363. break;
  4364. case 116:
  4365.  
  4366. { yyval.number  = ~yyvsp[0].number ; }
  4367. break;
  4368. case 117:
  4369.  
  4370. {
  4371.     if ( !( current_break_address &     0x80000  ) ) {
  4372.         yyerror("Default outside switch");
  4373.         break;
  4374.     }
  4375.     current_break_address &= ~(    0x40000 |    0x80000 );
  4376.     if ( read_short(current_break_address+2 ) )
  4377.         yyerror("Duplicate default");
  4378.     upd_short(current_break_address+2, mem_block[    0 ].current_size);
  4379.     current_break_address |= (    0x40000 |    0x80000 );
  4380.     }
  4381. break;
  4382. case 118:
  4383.  
  4384. { yyval.type  = yyvsp[0].type ; }
  4385. break;
  4386. case 119:
  4387.  
  4388. { ins_f_byte(260 ); }
  4389. break;
  4390. case 120:
  4391.  
  4392. { yyval.type  = yyvsp[0].type ; }
  4393. break;
  4394. case 122:
  4395.  
  4396. {
  4397.         if (exact_types && !compatible_types(yyvsp[-2].type , yyvsp[0].type ) &&
  4398.         !(yyvsp[-2].type  == 2  && yyvsp[0].type  == 1  && yyvsp[-1].number  == 296 ))
  4399.         {
  4400.         type_error("Bad assignment. Rhs", yyvsp[0].type );
  4401.         }
  4402.         ins_f_byte(yyvsp[-1].number );
  4403.         yyval.type  = yyvsp[0].type ;
  4404.     }
  4405. break;
  4406. case 123:
  4407.  
  4408. { yyerror("Illegal LHS");  yyval.type  = 5    ; }
  4409. break;
  4410. case 124:
  4411.  
  4412. { yyval.type  = yyvsp[0].type ; }
  4413. break;
  4414. case 125:
  4415.  
  4416. {
  4417.         ins_f_byte(258 );
  4418.         push_address();
  4419.         ins_short(0);
  4420.     }
  4421. break;
  4422. case 126:
  4423.  
  4424. {
  4425.         int i;
  4426.         i = pop_address();
  4427.         ins_f_byte(257 ); push_address(); ins_short(0);
  4428.         upd_short(i, mem_block[    0 ].current_size);
  4429.     }
  4430. break;
  4431. case 127:
  4432.  
  4433. {
  4434.         upd_short(pop_address(), mem_block[    0 ].current_size);
  4435.         if (exact_types && !compatible_types(yyvsp[-3].type , yyvsp[0].type )) {
  4436.         type_error("Different types in ?: expr", yyvsp[-3].type );
  4437.         type_error("                      and ", yyvsp[0].type );
  4438.         }
  4439.         if (yyvsp[-3].type  == 5    ) yyval.type  = yyvsp[0].type ;
  4440.         else if (yyvsp[0].type  == 5    ) yyval.type  = yyvsp[-3].type ;
  4441.         else if (((((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 0x0400    |5    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 0x0400    |5    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-3].type ) & 0x0400    ) && (( 0x0400    |5    ) & 0x0400    ) &&    (((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 0x0400    |5    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 0x0400    |5    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) ) yyval.type  = yyvsp[0].type ;
  4442.         else if (((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 0x0400    |5    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 0x0400    |5    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 0x0400    |5    ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 0x0400    |5    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 0x0400    |5    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) ) yyval.type  = yyvsp[-3].type ;
  4443.         else yyval.type  = yyvsp[-3].type ;
  4444.     }
  4445. break;
  4446. case 128:
  4447.  
  4448. { yyval.number  = 284 ; }
  4449. break;
  4450. case 129:
  4451.  
  4452. { yyval.number  = 324 ; }
  4453. break;
  4454. case 130:
  4455.  
  4456. { yyval.number  = 326 ; }
  4457. break;
  4458. case 131:
  4459.  
  4460. { yyval.number  = 328 ; }
  4461. break;
  4462. case 132:
  4463.  
  4464. { yyval.number  = 330 ; }
  4465. break;
  4466. case 133:
  4467.  
  4468. { yyval.number  = 332 ; }
  4469. break;
  4470. case 134:
  4471.  
  4472. { yyval.number  = 296 ; }
  4473. break;
  4474. case 135:
  4475.  
  4476. { yyval.number  = 297 ; }
  4477. break;
  4478. case 136:
  4479.  
  4480. { yyval.number  = 299 ; }
  4481. break;
  4482. case 137:
  4483.  
  4484. { yyval.number  = 315 ; }
  4485. break;
  4486. case 138:
  4487.  
  4488. { yyval.number  = 298 ; }
  4489. break;
  4490. case 139:
  4491.  
  4492. {
  4493.         if (exact_types && !((((exact_types) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((exact_types) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 3 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 3 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((exact_types) & 0x0400    ) && (( 3 ) & 0x0400    ) &&    (((exact_types) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((exact_types) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 3 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 3 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4494.         type_error("Must return a value for a function declared",
  4495.                exact_types);
  4496.         ins_f_byte(269 );
  4497.         ins_f_byte(276 );
  4498.     }
  4499. break;
  4500. case 140:
  4501.  
  4502. {
  4503.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( exact_types &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( exact_types &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( exact_types &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( exact_types &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( exact_types &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4504.         type_error("Return type not matching", exact_types);
  4505.         ins_f_byte(276 );
  4506.     }
  4507. break;
  4508. case 141:
  4509.  
  4510. { yyval.number  = 0; }
  4511. break;
  4512. case 142:
  4513.  
  4514. { yyval.number  = yyvsp[0].number ; }
  4515. break;
  4516. case 143:
  4517.  
  4518. { yyval.number  = yyvsp[-1].number ; }
  4519. break;
  4520. case 144:
  4521.  
  4522. { yyval.number  = 1; add_arg_type(yyvsp[0].type ); }
  4523. break;
  4524. case 145:
  4525.  
  4526. { yyval.number  = yyvsp[-2].number  + 1; add_arg_type(yyvsp[0].type ); }
  4527. break;
  4528. case 146:
  4529.  
  4530. { yyval.number  = 0; }
  4531. break;
  4532. case 147:
  4533.  
  4534. { yyval.number  = yyvsp[0].number ; }
  4535. break;
  4536. case 148:
  4537.  
  4538. { yyval.number  = yyvsp[-1].number ; }
  4539. break;
  4540. case 149:
  4541.  
  4542. { yyval.number  = 2; add_arg_type(yyvsp[-2].type ); add_arg_type(yyvsp[0].type ); }
  4543. break;
  4544. case 150:
  4545.  
  4546. { yyval.number  = yyvsp[-4].number  + 2; add_arg_type(yyvsp[-2].type ); add_arg_type(yyvsp[0].type ); }
  4547. break;
  4548. case 151:
  4549.  
  4550. { yyval.type  = yyvsp[0].type ; }
  4551. break;
  4552. case 152:
  4553.  
  4554. {
  4555.         ins_f_byte(261 ); ins_f_byte(259 );
  4556.         push_address();
  4557.         ins_short(0);
  4558.         ins_f_byte(260 );
  4559.     }
  4560. break;
  4561. case 153:
  4562.  
  4563. {
  4564.         upd_short(pop_address(), mem_block[    0 ].current_size);
  4565.         if (yyvsp[-3].type  == yyvsp[0].type )
  4566.         yyval.type  = yyvsp[-3].type ;
  4567.         else
  4568.         yyval.type  = 5    ;     
  4569.     }
  4570. break;
  4571. case 154:
  4572.  
  4573. { yyval.type  = yyvsp[0].type ; }
  4574. break;
  4575. case 155:
  4576.  
  4577. {
  4578.         ins_f_byte(261 ); ins_f_byte(258 );
  4579.         push_address();
  4580.         ins_short(0);
  4581.         ins_f_byte(260 );
  4582.     }
  4583. break;
  4584. case 156:
  4585.  
  4586. {
  4587.         upd_short(pop_address(), mem_block[    0 ].current_size);
  4588.         if (yyvsp[-3].type  == yyvsp[0].type )
  4589.         yyval.type  = yyvsp[-3].type ;
  4590.         else
  4591.         yyval.type  = 5    ;     
  4592.     }
  4593. break;
  4594. case 158:
  4595.  
  4596. {
  4597.           if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && ((1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4598.           type_error("Bad argument 1 to |", yyvsp[-2].type );
  4599.           if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && ((1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4600.           type_error("Bad argument 2 to |", yyvsp[0].type );
  4601.           yyval.type  = 1 ;
  4602.           ins_f_byte(325 );
  4603.       }
  4604. break;
  4605. case 160:
  4606.  
  4607. {
  4608.           if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && ((1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4609.           type_error("Bad argument 1 to ^", yyvsp[-2].type );
  4610.           if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && ((1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4611.           type_error("Bad argument 2 to ^", yyvsp[0].type );
  4612.           yyval.type  = 1 ;
  4613.           ins_f_byte(327 );
  4614.       }
  4615. break;
  4616. case 162:
  4617.  
  4618. {
  4619.           ins_f_byte(323 );
  4620.           if ( !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (0x0400    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (0x0400    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && ((0x0400    ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (0x0400    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (0x0400    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) ))  || !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (0x0400    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (0x0400    ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && ((0x0400    ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (0x0400    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (0x0400    ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) ))  ) {
  4621.               if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && ((1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4622.               type_error("Bad argument 1 to &", yyvsp[-2].type );
  4623.               if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( (1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && ((1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    (1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4624.               type_error("Bad argument 2 to &", yyvsp[0].type );
  4625.           }
  4626.           yyval.type  = 1 ;
  4627.       }
  4628. break;
  4629. case 164:
  4630.  
  4631. {
  4632.         int t1 = yyvsp[-2].type  &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) , t2 = yyvsp[0].type  &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ;
  4633.         if (exact_types && t1 != t2 && t1 != 5     && t2 != 5    ) {
  4634.         type_error("== always false because of different types", yyvsp[-2].type );
  4635.         type_error("                               compared to", yyvsp[0].type );
  4636.         }
  4637.         ins_f_byte(292 );
  4638.         yyval.type  = 1 ;
  4639.     }
  4640. break;
  4641. case 165:
  4642.  
  4643. {
  4644.         int t1 = yyvsp[-2].type  &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) , t2 = yyvsp[0].type  &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ;
  4645.         if (exact_types && t1 != t2 && t1 != 5     && t2 != 5    ) {
  4646.         type_error("!= always true because of different types", yyvsp[-2].type );
  4647.         type_error("                               compared to", yyvsp[0].type );
  4648.         }
  4649.         ins_f_byte(295 );
  4650.         yyval.type  = 1 ;
  4651.     }
  4652. break;
  4653. case 167:
  4654.  
  4655. { yyval.type  = 1 ; ins_f_byte(291 ); }
  4656. break;
  4657. case 168:
  4658.  
  4659. { yyval.type  = 1 ; ins_f_byte(293 ); }
  4660. break;
  4661. case 169:
  4662.  
  4663. { yyval.type  = 1 ; ins_f_byte(290 ); }
  4664. break;
  4665. case 170:
  4666.  
  4667. { yyval.type  = 1 ; ins_f_byte(294 ); }
  4668. break;
  4669. case 172:
  4670.  
  4671. {
  4672.         ins_f_byte(329 );
  4673.         yyval.type  = 1 ;
  4674.         if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4675.         type_error("Bad argument number 1 to '<<'", yyvsp[-2].type );
  4676.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4677.         type_error("Bad argument number 2 to '<<'", yyvsp[0].type );
  4678.     }
  4679. break;
  4680. case 173:
  4681.  
  4682. {
  4683.         ins_f_byte(331 );
  4684.         yyval.type  = 1 ;
  4685.         if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4686.         type_error("Bad argument number 1 to '>>'", yyvsp[-2].type );
  4687.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4688.         type_error("Bad argument number 2 to '>>'", yyvsp[0].type );
  4689.     }
  4690. break;
  4691. case 175:
  4692.  
  4693. { ins_f_byte(286 ); yyval.type  = 5    ; }
  4694. break;
  4695. case 176:
  4696.  
  4697. {
  4698.         int bad_arg = 0;
  4699.  
  4700.         if (exact_types) {
  4701.         if (!((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) ))  && !(yyvsp[-2].type  & 0x0400    ) ) {
  4702.                     type_error("Bad argument number 1 to '-'", yyvsp[-2].type );
  4703.             bad_arg++;
  4704.         }
  4705.         if (!((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) ))  && !(yyvsp[0].type  & 0x0400    ) ) {
  4706.                     type_error("Bad argument number 2 to '-'", yyvsp[0].type );
  4707.             bad_arg++;
  4708.         }
  4709.         }
  4710.         yyval.type  = 5    ;
  4711.         if ((yyvsp[-2].type  & 0x0400    ) || (yyvsp[0].type  & 0x0400    ))
  4712.         yyval.type  = 0x0400     | 5    ;
  4713.         if (!(yyvsp[-2].type  & 0x0400    ) || !(yyvsp[0].type  & 0x0400    )) {
  4714.         if (exact_types && yyval.type  != 5     && !bad_arg)
  4715.             yyerror("Arguments to '-' don't match");
  4716.         yyval.type  = 1 ;
  4717.         }
  4718.         ins_f_byte(287 );
  4719.     }
  4720. break;
  4721. case 178:
  4722.  
  4723. {
  4724.         if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4725.         type_error("Bad argument number 1 to '*'", yyvsp[-2].type );
  4726.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4727.         type_error("Bad argument number 2 to '*'", yyvsp[0].type );
  4728.         ins_f_byte(288 );
  4729.         yyval.type  = 1 ;
  4730.     }
  4731. break;
  4732. case 179:
  4733.  
  4734. {
  4735.         if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4736.         type_error("Bad argument number 1 to '%'", yyvsp[-2].type );
  4737.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4738.         type_error("Bad argument number 2 to '%'", yyvsp[0].type );
  4739.         ins_f_byte(314 );
  4740.         yyval.type  = 1 ;
  4741.     }
  4742. break;
  4743. case 180:
  4744.  
  4745. {
  4746.         if (exact_types && !((((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-2].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-2].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-2].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4747.         type_error("Bad argument number 1 to '/'", yyvsp[-2].type );
  4748.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4749.         type_error("Bad argument number 2 to '/'", yyvsp[0].type );
  4750.         ins_f_byte(289 );
  4751.         yyval.type  = 1 ;
  4752.     }
  4753. break;
  4754. case 182:
  4755.  
  4756. {
  4757.           yyval.type  = yyvsp[-1].type ;
  4758.           if (exact_types && yyvsp[0].type  != 5     && yyvsp[0].type  != 0     &&
  4759.               yyvsp[-1].type  != 3 )
  4760.               type_error("Casts are only legal for type mixed, or when unknown", yyvsp[0].type );
  4761.           }
  4762. break;
  4763. case 184:
  4764.  
  4765. {
  4766.         ins_f_byte(278 );
  4767.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4768.         type_error("Bad argument to ++", yyvsp[0].type );
  4769.         yyval.type  = 1 ;
  4770.     }
  4771. break;
  4772. case 185:
  4773.  
  4774. {
  4775.         ins_f_byte(279 );
  4776.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4777.         type_error("Bad argument to --", yyvsp[0].type );
  4778.         yyval.type  = 1 ;
  4779.     }
  4780. break;
  4781. case 186:
  4782.  
  4783. {
  4784.         ins_f_byte(339 );     
  4785.         yyval.type  = 1 ;
  4786.     }
  4787. break;
  4788. case 187:
  4789.  
  4790. {
  4791.         ins_f_byte(322 );
  4792.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4793.         type_error("Bad argument to ~", yyvsp[0].type );
  4794.         yyval.type  = 1 ;
  4795.     }
  4796. break;
  4797. case 188:
  4798.  
  4799. {
  4800.         ins_f_byte(300 );
  4801.         if (exact_types && !((((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[0].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[0].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[0].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4802.         type_error("Bad argument to unary '-'", yyvsp[0].type );
  4803.         yyval.type  = 1 ;
  4804.     }
  4805. break;
  4806. case 190:
  4807.  
  4808. {
  4809.          ins_f_byte(280 );
  4810.          if (exact_types && !((((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-1].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4811.          type_error("Bad argument to ++", yyvsp[-1].type );
  4812.          yyval.type  = 1 ;
  4813.      }
  4814. break;
  4815. case 191:
  4816.  
  4817. {
  4818.          ins_f_byte(281 );
  4819.          if (exact_types && !((((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-1].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4820.          type_error("Bad argument to --", yyvsp[-1].type );
  4821.          yyval.type  = 1 ;
  4822.      }
  4823. break;
  4824. case 193:
  4825.  
  4826. {
  4827.         int pos = mem_block[    0 ].current_size;
  4828.          
  4829.         if (last_push_identifier == pos-2)
  4830.         mem_block[    0 ].block[last_push_identifier] =
  4831.             272  -     257 ;
  4832.         else if (last_push_local == pos-2)
  4833.         mem_block[    0 ].block[last_push_local] =
  4834.             310  -     257 ;
  4835.         else if (last_push_indexed == pos-1)
  4836.         mem_block[    0 ].block[last_push_indexed] =
  4837.             268  -     257 ;
  4838.         else if (last_push_indexed != 0)
  4839.         fatal("Should be a push at this point !\n");
  4840.         yyval.type  = yyvsp[0].type ;
  4841.     }
  4842. break;
  4843. case 196:
  4844.  
  4845. { yyval.type  = yyvsp[-1].type ; }
  4846. break;
  4847. case 197:
  4848.  
  4849. { yyval.type  = 5    ; }
  4850. break;
  4851. case 198:
  4852.  
  4853. { yyval.type  = 1 ; }
  4854. break;
  4855. case 199:
  4856.  
  4857. { yyval.type  = 1 ; }
  4858. break;
  4859. case 200:
  4860.  
  4861. {
  4862.        pop_arg_stack(yyvsp[-2].number );         
  4863.        ins_f_byte(320 );
  4864.        ins_short(yyvsp[-2].number );
  4865.        yyval.type  = 0x0400     | 5    ;
  4866.        }
  4867. break;
  4868. case 201:
  4869.  
  4870. {
  4871.        pop_arg_stack(yyvsp[-2].number );
  4872.        ins_f_byte(321 );
  4873.        ins_short(yyvsp[-2].number );
  4874.        yyval.type  = 6 ;
  4875.        }
  4876. break;
  4877. case 202:
  4878.  
  4879. { ins_f_byte(333 ); push_address(); ins_short(0);}
  4880. break;
  4881. case 203:
  4882.  
  4883. {
  4884.            ins_f_byte(260 );
  4885.  
  4886.            ins_f_byte(269 );
  4887.            ins_f_byte(453 );
  4888.  
  4889.  
  4890.  
  4891.            upd_short(pop_address(),
  4892.                  mem_block[    0 ].current_size);
  4893.            }
  4894. break;
  4895. case 204:
  4896.  
  4897. {
  4898.         ins_f_byte(307 ); ins_byte(yyvsp[-1].number  + 2);
  4899.     }
  4900. break;
  4901. case 205:
  4902.  
  4903. {
  4904.         ins_f_byte(308 ); ins_byte(yyvsp[-1].number  + 3);
  4905.     }
  4906. break;
  4907. case 206:
  4908.  
  4909. { yyval.number  = 0; }
  4910. break;
  4911. case 207:
  4912.  
  4913. { yyval.number  = 1 + yyvsp[0].number ; }
  4914. break;
  4915. case 208:
  4916.  
  4917. {
  4918.         int i = verify_declared(yyvsp[0].string );
  4919.         last_push_identifier = mem_block[    0 ].current_size;
  4920.         ins_f_byte(264 );
  4921.         ins_byte(i);
  4922.         xfree(yyvsp[0].string );
  4923.         if (i == -1)
  4924.         yyval.type  = 5    ;
  4925.         else
  4926.         yyval.type  = ((struct variable *)mem_block[    3 ].block + (i)) ->type &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ;
  4927.     }
  4928. break;
  4929. case 209:
  4930.  
  4931. {
  4932.         last_push_local = mem_block[    0 ].current_size;
  4933.         ins_f_byte(265 );
  4934.         ins_byte(yyvsp[0].number );
  4935.         yyval.type  = type_of_locals[yyvsp[0].number ];
  4936.     }
  4937. break;
  4938. case 210:
  4939.  
  4940. {
  4941.           ins_f_byte(467 );
  4942.           last_push_indexed = 0;
  4943.           if (exact_types) {
  4944.           if ((yyvsp[-5].type  & 0x0400    ) == 0 && !((((yyvsp[-5].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-5].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-5].type ) & 0x0400    ) && (( 2 ) & 0x0400    ) &&    (((yyvsp[-5].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-5].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4945.               type_error("Bad type to indexed value", yyvsp[-5].type );
  4946.           if (!((((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-3].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4947.               type_error("Bad type of index", yyvsp[-3].type );
  4948.           if (!((((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-1].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4949.               type_error("Bad type of index", yyvsp[-1].type );
  4950.           }
  4951.           if (yyvsp[-5].type  == 5    )
  4952.           yyval.type  = 5    ;
  4953.           else if (((((yyvsp[-5].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-5].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-5].type ) & 0x0400    ) && (( 2 ) & 0x0400    ) &&    (((yyvsp[-5].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-5].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4954.           yyval.type  = 2 ;
  4955.           else if (yyvsp[-5].type  & 0x0400    )
  4956.           yyval.type  = yyvsp[-5].type ;
  4957.           else if (exact_types)
  4958.           type_error("Bad type of argument used for range", yyvsp[-5].type );
  4959.       }
  4960. break;
  4961. case 211:
  4962.  
  4963. {
  4964.           last_push_indexed = mem_block[    0 ].current_size;
  4965.           ins_f_byte(266 );
  4966.           if (exact_types  && !(yyvsp[-3].type  & 6 )) {
  4967.           if ((yyvsp[-3].type  & 0x0400    ) == 0 && !((((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-3].type ) & 0x0400    ) && (( 2 ) & 0x0400    ) &&    (((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4968.               type_error("Bad type to indexed value", yyvsp[-3].type );
  4969.           if (!((((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-1].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 1 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-1].type ) & 0x0400    ) && (( 1 ) & 0x0400    ) &&    (((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-1].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 1 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4970.               type_error("Bad type of index", yyvsp[-1].type );
  4971.           }
  4972.           if (yyvsp[-3].type  == 5    )
  4973.           yyval.type  = 5    ;
  4974.           else if (((((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((yyvsp[-3].type ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( 2 ) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((yyvsp[-3].type ) & 0x0400    ) && (( 2 ) & 0x0400    ) &&    (((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((yyvsp[-3].type ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( 2 ) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) )
  4975.           yyval.type  = 1 ;
  4976.           else if (yyvsp[-3].type  == 6 )
  4977.           yyval.type  = 5    ;
  4978.           else
  4979.           yyval.type  = yyvsp[-3].type  &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    ;
  4980.       }
  4981. break;
  4982. case 212:
  4983.  
  4984. {
  4985.         ins_f_byte(277 );
  4986.         ins_short(store_prog_string(yyvsp[0].string ));
  4987.         xfree(yyvsp[0].string );
  4988.         yyval.type  = 2 ;
  4989.     }
  4990. break;
  4991. case 213:
  4992.  
  4993. {
  4994.             char *p = make_shared_string(yyvsp[0].string );
  4995.             xfree(yyvsp[0].string );
  4996.             yyval.string  = p;
  4997.         }
  4998. break;
  4999. case 215:
  5000.  
  5001. {
  5002.         yyval.string  = xalloc( strlen(yyvsp[-2].string ) + strlen(yyvsp[0].string ) + 1 );
  5003.         strcpy(yyval.string , yyvsp[-2].string );
  5004.         strcat(yyval.string , yyvsp[0].string );
  5005.         xfree(yyvsp[-2].string );
  5006.         xfree(yyvsp[0].string );
  5007.     }
  5008. break;
  5009. case 216:
  5010.  
  5011. {
  5012.      
  5013.  
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.     yyval.funp  = 0;
  5021.     if (defined_function(yyvsp[0].string , 0) == -1) {
  5022.         char *p = make_shared_string(yyvsp[0].string );
  5023.         yyval.funp  = find_simul_efun(p);
  5024.         if (yyval.funp  && !(yyval.funp ->type &     0x0100    )) {
  5025.         ins_f_byte(277 );
  5026.         ins_short(store_prog_string(
  5027.                   query_simul_efun_file_name()));
  5028.         ins_f_byte(277 );
  5029.         ins_short(store_prog_string(p));
  5030.         } else {
  5031.         yyval.funp  = 0;
  5032.         }
  5033.         free_string(p);
  5034.     }
  5035.     }
  5036. break;
  5037. case 217:
  5038.  
  5039.     int f;
  5040.     int efun_override = strncmp(yyvsp[-4].string , "efun::", 6) == 0;
  5041.  
  5042.     if (yyvsp[-3].funp ) {
  5043.         ins_f_byte(351 );
  5044.         ins_byte(yyvsp[-1].number  + 2);
  5045.  
  5046.         ins_short(-1); 
  5047.  
  5048.         yyval.type  = yyvsp[-3].funp ->type;
  5049.     } else if (!efun_override && (f = defined_function(yyvsp[-4].string , 0)) >= 0) {
  5050.         struct function *funp;
  5051.         ins_f_byte(263 ); ins_short(f);
  5052.         ins_byte(yyvsp[-1].number );     
  5053.         funp = ((struct function *)mem_block[    1 ].block + (f)) ;
  5054.         if (funp->flags &     0x2    )
  5055.         find_inherited(funp);
  5056.          
  5057.  
  5058.  
  5059.         if ((funp->flags &     0x2    ) &&
  5060.         !(funp->flags &     0x10    ) && exact_types)
  5061.         {
  5062.         char buff[100];
  5063.         sprintf(buff, "Function %.50s undefined", funp->name);
  5064.         yyerror(buff);
  5065.         }
  5066.         yyval.type  = funp->type &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ;
  5067.          
  5068.  
  5069.  
  5070.         if (funp->num_arg != yyvsp[-1].number  && !(funp->type & 0x4000    ) &&
  5071.         (funp->flags & 0x4    ) && exact_types)
  5072.         {
  5073.         char buff[100];
  5074.         sprintf(buff, "Wrong number of arguments to %.60s", yyvsp[-4].string );
  5075.         yyerror(buff);
  5076.         }
  5077.          
  5078.  
  5079.  
  5080.         if (exact_types && *(unsigned short *)&mem_block[7 ].block[f * sizeof (unsigned short)] !=     65535 )
  5081.         {
  5082.         int i, first;
  5083.         unsigned short *arg_types;
  5084.         
  5085.         arg_types = (unsigned short *)
  5086.             mem_block[6 ].block;
  5087.         first = *(unsigned short *)&mem_block[7 ].block[f * sizeof (unsigned short)];
  5088.         for (i=0; i < funp->num_arg && i < yyvsp[-1].number ; i++) {
  5089.             int tmp = get_argument_type(i, yyvsp[-1].number );
  5090.             if (!((((tmp) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((tmp) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( arg_types[first + i]) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( arg_types[first + i]) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((tmp) & 0x0400    ) && (( arg_types[first + i]) & 0x0400    ) &&    (((tmp) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((tmp) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( arg_types[first + i]) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( arg_types[first + i]) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) )) ) {
  5091.             char buff[100];
  5092.             sprintf(buff, "Bad type for argument %d %s", i+1,
  5093.                 get_two_types(arg_types[first+i], tmp));
  5094.             yyerror(buff);
  5095.             }
  5096.         }
  5097.         }
  5098.     } else if (efun_override || (f = lookup_predef(yyvsp[-4].string )) != -1) {
  5099.         int min, max, def, *argp;
  5100.         extern int efun_arg_types[];
  5101.  
  5102.         if (efun_override) {
  5103.         f = lookup_predef(yyvsp[-4].string +6);
  5104.         }
  5105.         if (f == -1) {     
  5106.         char buff[100];
  5107.         sprintf(buff, "Unknown efun: %s", yyvsp[-4].string +6);
  5108.         yyerror(buff);
  5109.         } else {
  5110.         min = instrs[f-    257 ].min_arg;
  5111.         max = instrs[f-    257 ].max_arg;
  5112.         def = instrs[f-    257 ].Default;
  5113.         yyval.type  = instrs[f-    257 ].ret_type;
  5114.         argp = &efun_arg_types[instrs[f-    257 ].arg_index];
  5115.         if (def && yyvsp[-1].number  == min-1) {
  5116.             ins_f_byte(def);
  5117.             max--;
  5118.             min--;
  5119.         } else if (yyvsp[-1].number  < min) {
  5120.             char bff[100];
  5121.             sprintf(bff, "Too few arguments to %s",
  5122.                 instrs[f-    257 ].name);
  5123.             yyerror(bff);
  5124.         } else if (yyvsp[-1].number  > max && max != -1) {
  5125.             char bff[100];
  5126.             sprintf(bff, "Too many arguments to %s",
  5127.                 instrs[f-    257 ].name);
  5128.             yyerror(bff);
  5129.         } else if (max != -1 && exact_types) {
  5130.              
  5131.  
  5132.  
  5133.             int i, argn;
  5134.             char buff[100];
  5135.             for (argn=0; argn < yyvsp[-1].number ; argn++) {
  5136.             int tmp = get_argument_type(argn, yyvsp[-1].number );
  5137.             for(i=0; !((((argp[i]) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5     ||    ((argp[i]) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == ( ( tmp) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) ||    ( ( tmp) &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ) == 5    )  ||    (((argp[i]) & 0x0400    ) && (( tmp) & 0x0400    ) &&    (((argp[i]) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5     ||    ((argp[i]) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == (    ( tmp) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) ||    (    ( tmp) & (    (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    ))  & ~0x0400    )) == 5    ) ))  && argp[i] != 0; i++)
  5138.                 ;
  5139.             if (argp[i] == 0) {
  5140.                 sprintf(buff, "Bad argument %d type to efun %s()",
  5141.                     argn+1, instrs[f-    257 ].name);
  5142.                 yyerror(buff);
  5143.             }
  5144.             while(argp[i] != 0)
  5145.                 i++;
  5146.             argp += i + 1;
  5147.             }
  5148.         }
  5149.         ins_f_byte(f);
  5150.          
  5151.  
  5152.  
  5153.         if (max != min)
  5154.             ins_byte(yyvsp[-1].number ); 
  5155.  
  5156.         if (f == 351 )
  5157.             ins_short(-1); 
  5158.  
  5159.         }
  5160.     } else {
  5161.         struct function *funp;
  5162.  
  5163.         f = define_new_function(yyvsp[-4].string , 0, 0, 0,     0x2    , 0);
  5164.         ins_f_byte(263 );
  5165.         ins_short(f);
  5166.         ins_byte(yyvsp[-1].number );     
  5167.         funp = ((struct function *)mem_block[    1 ].block + (f)) ;
  5168.         if (strchr(yyvsp[-4].string , ':')) {
  5169.          
  5170.  
  5171.  
  5172.  
  5173.         find_inherited(funp);
  5174.         }
  5175.          
  5176.  
  5177.  
  5178.  
  5179.  
  5180.         if (exact_types && (funp->flags &     0x2    )) {
  5181.         char buff[100];
  5182.         sprintf(buff, "Undefined function %.50s", yyvsp[-4].string );
  5183.         yyerror(buff);
  5184.         }
  5185.         if (!(funp->flags &     0x2    ))
  5186.         yyval.type  = funp->type &     (~(    0x0100     | 0x0200     |    0x0800     | 0x1000  |        0x2000   | 0x4000    )) ;
  5187.         else
  5188.         yyval.type  = 5    ;     
  5189.     }
  5190.     xfree(yyvsp[-4].string );
  5191.     pop_arg_stack(yyvsp[-1].number );     
  5192.     }
  5193. break;
  5194. case 218:
  5195.  
  5196. {
  5197.     ins_f_byte(277 );
  5198.     ins_short(store_prog_string(yyvsp[0].string ));
  5199.     xfree(yyvsp[0].string );
  5200.     }
  5201. break;
  5202. case 219:
  5203.  
  5204. {
  5205.     ins_f_byte(351 );
  5206.     ins_byte(yyvsp[-1].number  + 2);
  5207.     yyval.type  = 0    ;
  5208.  
  5209.  
  5210.     ins_short(-1);
  5211.  
  5212.  
  5213.     pop_arg_stack(yyvsp[-1].number );     
  5214.     }
  5215. break;
  5216. case 221:
  5217.  
  5218. {
  5219.             char *p = xalloc(strlen(yyvsp[0].string ) + 3);
  5220.             strcpy(p, "::"); strcat(p, yyvsp[0].string ); xfree(yyvsp[0].string );
  5221.             yyval.string  = p;
  5222.         }
  5223. break;
  5224. case 222:
  5225.  
  5226. {
  5227.             char *p = xalloc(strlen(yyvsp[-2].string ) + strlen(yyvsp[0].string ) + 3);
  5228.             strcpy(p, yyvsp[-2].string ); strcat(p, "::"); strcat(p, yyvsp[0].string );
  5229.             xfree(yyvsp[-2].string ); xfree(yyvsp[0].string );
  5230.             yyval.string  = p;
  5231.         }
  5232. break;
  5233. case 223:
  5234.  
  5235. {
  5236.             char *p = xalloc(strlen(local_names[yyvsp[0].number ]) + 1);
  5237.             strcpy(p, local_names[yyvsp[0].number ]);
  5238.             yyval.string  = p;
  5239.         }
  5240. break;
  5241. case 225:
  5242.  
  5243. {
  5244.         int i;
  5245.         i = pop_address();
  5246.         ins_f_byte(257 ); push_address(); ins_short(0);
  5247.         upd_short(i, mem_block[    0 ].current_size);
  5248.     }
  5249. break;
  5250. case 226:
  5251.  
  5252. { upd_short(pop_address(), mem_block[    0 ].current_size); }
  5253. break;
  5254. case 227:
  5255.  
  5256. {
  5257.         ins_f_byte(258 );
  5258.         push_address();
  5259.         ins_short(0);
  5260.     }
  5261. break;
  5262.  
  5263.     }
  5264.     yyssp -= yym;
  5265.     yystate = *yyssp;
  5266.     yyvsp -= yym;
  5267.     yym = yylhs[yyn];
  5268.     if (yystate == 0 && yym == 0)
  5269.     {
  5270.  
  5271.         if (yydebug)
  5272.             printf("yydebug: after reduction, shifting from state 0 to state %d\n", 1 );
  5273.  
  5274.  
  5275.         yystate = 1 ;
  5276.         *++yyssp = 1 ;
  5277.         *++yyvsp = yyval;
  5278.         if (yychar < 0)
  5279.         {
  5280.             if ((yychar = yylex()) < 0) yychar = 0;
  5281.  
  5282.         }
  5283.         if (yychar == 0) goto yyaccept;
  5284.         goto yyloop;
  5285.     }
  5286.     if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
  5287.             yyn <= 2153  && yycheck[yyn] == yystate)
  5288.         yystate = yytable[yyn];
  5289.     else
  5290.         yystate = yydgoto[yym];
  5291.  
  5292.     if (yydebug)
  5293.         printf("yydebug: after reduction, shifting from state %d to state %d\n", *yyssp, yystate);
  5294.  
  5295.  
  5296.     if (yyssp >= yyss + 600    - 1)
  5297.     {
  5298.         goto yyoverflow;
  5299.     }
  5300.     *++yyssp = yystate;
  5301.     *++yyvsp = yyval;
  5302.     goto yyloop;
  5303. yyoverflow:
  5304.     yyerror("yacc stack overflow");
  5305. yyabort:
  5306.     return (1);
  5307. yyaccept:
  5308.     return (0);
  5309. }
  5310.